This is only bug and feature tracker, please use it
to report bugs or request features.
Hello everyone,
I'm working on a indoor drone project and recently I noticed something bad:
the topics are being updating in a very low rate (less than 1Hz) (including the topic mavros/local_position/pose that is important to control the drone on OFFBOARD mode).
It's turning the flight control difficult by setposition topic because the drone doesn't know its correct altitude in real time. When I test this test algorithm (fly 1 meter and hold its position), on Gazebo Simulator, the Mavros topics are updating in a nice rate.
In order to verify if the problem is the telemetry system, I tested the information update rate on QGroundControl and when I move the drone, the information are instantaneously updated. Then, I suppose the telemetry system (3DR Radio Link) is not the problem.
I'm launching mavros by this command:
roslaunch mavros px4.launch fcu_url:=/dev/ttyUSB0:57600
If there's a way to solve this problem (high latency on topic updating using telemetry) please tell me.
Mavros: 0.18.4
ROS: Lunar 1.13.7
Ubuntu: 16.04
[ ] ArduPilot
[X] PX4
Version: 3.7.1 (PX4FMU_V3) Pixhawk 2
started roslaunch server http://lucas-Inspiron-7460:40689/
CLEAR PARAMETERS
PARAMETERS
NODES
/
mavros (mavros/mavros_node)
auto-starting new master
process[master]: started with pid [2541]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 9a6d39f0-3495-11e9-b342-d80f99bfeedd
process[rosout-1]: started with pid [2554]
started core service [/rosout]
process[mavros-2]: started with pid [2558]
```
header:
seq: 2138
stamp:
secs: 1550618079
nsecs: 476350000
frame_id: ''
status:
OK. I got messages from 1:1.
Received 371 messages, from 1 addresses
sys:comp list of messages
Thanks for the help!
With that baud rate in that telemetry link it looks perfectly normal that you are getting the data at those rates, considering that the link rate profiles of PX4 for these kind of links are quite low. I would follow https://docs.px4.io/en/peripherals/serial_configuration.html and try to setup your link baud rate to 115200.
Dear TSC21,
Thank you for reply me.
I followed what you recommended me but I hadn't success. When I change the link baudrate to 115200, I can't access the drone via telemetry. The QGroundControl only displays: "Waiting for Vehicle Connection". I tried to follow that link you posted here and I changed these parameters (aiming to change the baudrate link):
SER_TEL1_BAUD - from "57600" to "115200"
MAV_0_RATE - from "1200" to "115200"
MAV_0_MODE - from "0" to "1" (normal -> custom)
If there's something wrong in this procedure, please, tell me.
Thank you very much.
Please bring this matter to PX4 Slack.
I solved this issue just changing the parameter "MAV_0_RATE" (from 1200 (default) to 57600) without change baud rate parameters. Previously I was trying to change the SER_TEL1_BAUD parameter (from 57600 to 115200) but it didn't solve the issue and the telemetry didn't work with this baud rate. Then I tested just the MAV_0_RATE and it worked well.
I solved this issue just changing the parameter "MAV_0_RATE" (from 1200 (default) to 57600) without change baud rate parameters. Previously I was trying to change the SER_TEL1_BAUD parameter (from 57600 to 115200) but it didn't solve the issue and the telemetry didn't work with this baud rate. Then I tested just the MAV_0_RATE and it worked well.
Hi, how did you go about changing the MAV_0_RATE? I've looked for it in the parameter list in Mission Planner but can't find it.
I solved this issue just changing the parameter "MAV_0_RATE" (from 1200 (default) to 57600) without change baud rate parameters. Previously I was trying to change the SER_TEL1_BAUD parameter (from 57600 to 115200) but it didn't solve the issue and the telemetry didn't work with this baud rate. Then I tested just the MAV_0_RATE and it worked well.
Hi, how did you go about changing the MAV_0_RATE? I've looked for it in the parameter list in Mission Planner but can't find it.
It depends on the PX4 version you are running. I accessed this parameter by QGroundControl. You can check the parameters here:
https://docs.px4.io/v1.9.0/en/advanced_config/parameter_reference.html
If you are not finding the parameter by QGroundControl I recommend you set this parameter by PX4 command line
For anyone who is still looking for a solution.
I wanted to increase the publishing rate of Odometry & HIGHRES_IMU messages.
Here's how I solved this problem:
1- Increase the baud rate of the serial communication by changing these PX4 parameters on QGroundControl, and then reboot the UAV.
SER_TEL1_BAUD - from "57600" to "115200"
MAV_0_RATE - from "1200" to "115200"
MAV_0_MODE - from "0" to "1" (normal -> custom)
References:
https://docs.px4.io/master/en/peripherals/serial_configuration.html#how-to-configure-a-port
https://github.com/mavlink/mavros/issues/1182#issuecomment-465672331
2- Change the rate that Mavlink publishes the ODOMETRY/ HIGHRES_IMU messages in. This can be done by writing this command on the microSD card in PX4. How?
Remove the card from Pixhawk and connect to your PC. Then go to ./fs/etc/extras.txt
If this directory (or part of it) does not exist, create it. Then, inside extras.txt, we should write:
mavlink stream -d /dev/ttyS0 -s HIGHRES_IMU -r 200
mavlink stream -d /dev/ttyS0 -s ODOMETRY -r 200
Reference:
https://dev.px4.io/v1.9.0/en/concept/system_startup.html#starting-additional-applications
For completeness, here is my setup details:
Mavros: 1.4
ROS: Melodic
Ubuntu: 18.04
PX4
Version: v1.10.1
PX4_FMU_V5 (V500)
NuttX, v7.29.0
Most helpful comment
I solved this issue just changing the parameter "MAV_0_RATE" (from 1200 (default) to 57600) without change baud rate parameters. Previously I was trying to change the SER_TEL1_BAUD parameter (from 57600 to 115200) but it didn't solve the issue and the telemetry didn't work with this baud rate. Then I tested just the MAV_0_RATE and it worked well.