stream rate wait
This commit is contained in:
parent
a9335d973a
commit
dfa7519bd5
|
@ -18,7 +18,7 @@
|
|||
</include>
|
||||
|
||||
<!-- set streaming rate -->
|
||||
<node pkg="rosservice" type="rosservice" name="freq" args="call /mavros/set_stream_rate 0 10 1" output="screen" />
|
||||
<!-- node pkg="rosservice" type="rosservice" name="freq" args="call /mavros/set_stream_rate 0 10 1" output="screen" / -->
|
||||
|
||||
<!-- run xbee -->
|
||||
<node pkg="xbee_ros_node" type="xbee_mav" name="xbee_mav" args="slave swarm" output="screen" />
|
||||
|
|
|
@ -686,11 +686,12 @@ namespace rosbzz_node{
|
|||
message.request.stream_id = id;
|
||||
message.request.message_rate = rate;
|
||||
message.request.on_off = on_off;
|
||||
if(stream_client.call(message)){
|
||||
ROS_INFO("Set Mode Service call successful!");
|
||||
} else {
|
||||
ROS_INFO("Set Mode Service call failed!");
|
||||
|
||||
while(!stream_client.call(message)){
|
||||
ROS_INFO("Set stream rate call failed!, trying again...");
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds ( 2000 ) );
|
||||
}
|
||||
ROS_INFO("Set stream rate call successful");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue