ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

increase/change mavros local_position pose publish frequency

asked 2020-09-11 02:25:35 -0500

noob_ros gravatar image

How do I increase or change the mavros/local_position/pose publishing frequency? (Default only 30Hz)

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2021-04-21 08:50:43 -0500

Lucas2903 gravatar image

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.

edit flag offensive delete link more
1

answered 2020-11-15 07:26:07 -0500

Weasfas gravatar image

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.

edit flag offensive delete link more

Comments

it worked like a charm!

Marcus Barnet gravatar image Marcus Barnet  ( 2022-05-19 03:00:19 -0500 )edit
0

answered 2020-11-13 10:31:57 -0500

Root3287 gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-09-11 02:25:35 -0500

Seen: 860 times

Last updated: Apr 21 '21