Home        Store        Docs        Blog

Getting imu data from bluerov ros setup. Also how to tune the PID?

(shubhankar) #1

Hey, I just wanted help in getting IMU data from the pixhawk. I tried echoing the mavros/imu topic. There is nothing being posted there. I have the pixhawk connected with Pi2 and Pi2 connected to a surface computer. The pixhawk seems to be generating PWM.

Also how can I tune the PID. The mavros topic is saying that the pixhawk is unarmed and mavros is not connected. Pixhawk gets armed when I press start in the controller.

Thanks a lot in advance.

(Jacob) #2

Can you show some output of what you are trying and seeing? What is the output of rostopic list? According to this, it looks like the data you are looking for is published under mavros/imu/data, not mavros/imu.

(shubhankar) #3

This is the output of rostopic list,

rostopic echo /mavros/imu/data
rostopic echo /mavros/imu/data_raw

outputs nothing.


(shubhankar) #4

This is the output of
rostopic echo /mavros/state
seq: 85
secs: 828
nsecs: 164358205
frame_id: ''
connected: False
armed: False
guided: False
mode: ‘’

(Jacob) #5

How is the Pixhawk connected to your computer, and how are you launching mavros? You need to set the fcu_url correctly to connect.

(shubhankar) #6

Hey Jacob, it worked. Thanks for all your help. I forgot to set up the streaming rate before echoing the topic.

rosservice call /mavros/set_stream_rate 0 10 1

Can you tell me how can I tune the PID.

(Jacob) #7

@charlie.brown There are many PIDs in the software. You can tune the PIDs by adjusting user-settable variables called parameters. The attitude rate control PID coefficients are in the ATC_ group of parameters, the attitude angle control PID coefficients are also in the ATC_ group, the z-axis depth hold parameters are in the POS_, VEL_ and ACCEL_ groups.