Closed jellosubmarine closed 5 years ago
Results from testing:
Might be that Pixhawk wants a 3d fix and QGC automatically provides it upon connection.
http://forum.erlerobotics.com/t/ros-topics-not-publishing-anything/142
You need to set the stream rate:
rosservice call /mavros/set_stream_rate 0 10 1
or if you are using C++:
ros::NodeHandle n;
ros::ServiceClient client = n.serviceClient<mavros::StreamRate>("/mavros/set_stream_rate");
mavros::StreamRate srv;
srv.request.stream_id = 0;
srv.request.message_rate = 10;
srv.request.on_off = 1;
if(client.call(srv)){
ROS_INFO("Service called");
}else{
ROS_INFO("Failed to call service");
}
Moved the code added by Rando to main(). Seems to work, not tested on hardware.
/mavros/vfr_hud tends to be not publishing, fix was to calibrate altitude in QGroundControl. Need to implement this in code, probably through some service or find a workaround.