Mavros-mocap error

Hi everybody!
I trying to implement the typical configuration Optitrack+Companion PC (Raspy pi3-Ubuntu 16.04+ROS).
I followed step-by-step this beautiful guide: https://dev.px4.io/en/ros/external_position_estimation.html.

The problem is that the /mavros/local_position/pose and /mavros/mocap/pose topics are different and the px4.launch node returns, continuosly, this error:

[ INFO] [1501159465.907498283]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m
[ INFO] [1501159465.955114116]: FCU: [lpe] mocap timeout
[ INFO] [1501159466.555640158]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m
[ INFO] [1501159466.605336095]: FCU: [lpe] mocap timeout
[ INFO] [1501159467.206143543]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m
[ INFO] [1501159467.257601408]: FCU: [lpe] mocap timeout
[ INFO] [1501159467.806573178]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m
[ INFO] [1501159467.857350001]: FCU: [lpe] mocap timeout
[ INFO] [1501159468.457448126]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m
[ INFO] [1501159468.506785574]: FCU: [lpe] mocap timeout
[ INFO] [1501159469.157549532]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m
[ INFO] [1501159469.204930365]: FCU: [lpe] mocap timeout
[ INFO] [1501159469.478843490]: HP: requesting home position
[ INFO] [1501159469.757964063]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m
[ INFO] [1501159469.805681771]: FCU: [lpe] mocap timeout
[ INFO] [1501159470.406720365]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m
[ INFO] [1501159470.457914531]: FCU: [lpe] mocap timeout
[ INFO] [1501159471.006532969]: FCU: [lpe] mocap position init: 0.13, -0.07, -0.03 m

The px4fmu-v2_lpe firmware version is v1.6.0-rc4
Any suggestions?

Thanks,
Fabrizio

@Fabrizio_Boriero
You have to increase your Mocap sending rate. The lowest rate is 5Hz.

Thanks for your reply.

I update the /mavros/mocap/pose at 100 Hz and the connection between companion pc and px4 is set on maximum speed…

Ok solved!
The problem was that I was running the vrpn_node on a grorundstation (another PC).

Now both px4.launch and vrpn_node.launch are running on the companion PC.
Greetings

are you using vtpn_client_ros packet?

hi, i meet the same situation.
i use rasberrypi to pub mocap/pose with 100hz, yet still shows “mocap timeout” on qgc. i use a usb-ttl serial to connect pixhawk in baudrate 57600.
any suggestion?

Hello @marcel_qzq

If you ar using mocap data, you have to use 921600 baudrate.

Regards!!

hi @Mario1577
i changed baudrate to 921600, still shows “mocap timeout” on qgc.

ok, i found out why my qgc continue shows “mocap timeout”.
it’s actually because the timestamp of mocap/pose is wrong, if you did not give a correct timestamp, then every timestamp of “mocap/pose” topic is 0, so lpe checks “timeout”.
just add " mocappose.header.stamp=ros::Time::now(); " before publishing mocap pose topic, and it should start to work.

1 Like