increase/change mavros local_position pose publish frequency
How do I increase or change the mavros/local_position/pose publishing frequency? (Default only 30Hz)
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hi @noob_ros,
As @Root3287 said, you can try to dive into the code and search the correct line in which you can change the rate at which the node is publishing, however I do not recommend that in any case. Since the developers have included some options to change this rate.
You can execute in a terminal the command: rosrun mavros mavsys rate --all frq
beign frq
the target rate you want (E.g.: rosrun mavros mavsys rate --all 50
). With that command, you will change all the topics update rate. If you want to know more about this you can use the help argument: rosrun mavros mavsys rate -h
.
Hope it helps.
Regards.
This may not apply in general, but it is possible that the pose is published at 1Hz if the MAV_1_MODE
parameter is set to Normal
. Changing it to Onboard
will allow to publish at a much higher frequency.
Edit the parameter from QGroundControl.
You can change the frequency of your loop to whatever you want. There should be a rate object before your while
loop you can change the 30 to whatever you want.
Without the source code that all I could offer.
Asked: 2020-09-11 02:25:35 -0600
Seen: 1,098 times
Last updated: Apr 21 '21