Mocap/pose timeout

Hello!!

I am sending optitrack position data to pixhawk using mavros, so when I start to run mavros node the following message appears in the terminal:

[ INFO] [1495755162.936773363]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755162.992108849]: FCU: [lpe] reinit P
[ INFO] [1495755163.031707876]: FCU: [lpe] tz timeout
[ INFO] [1495755163.141037655]: FCU: [lpe] xy resume
[ INFO] [1495755163.453445938]: FCU: [lpe] mocap timeout
[ INFO] [1495755163.485895938]: FCU: [lpe] tz resume
[ WARN] [1495755166.672051523]: GP: No GPS fix
[ INFO] [1495755171.978686441]: FCU: [lpe] xy timeout
[ INFO] [1495755172.670911144]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755172.705030477]: FCU: [lpe] mocap timeout
[ INFO] [1495755181.870867523]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755181.903040518]: FCU: [lpe] mocap timeout
[ INFO] [1495755189.973277609]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755190.162792328]: FCU: [lpe] mocap timeout
[ WARN] [1495755197.114361150]: GP: No GPS fix
[ INFO] [1495755198.223671379]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755198.285363746]: FCU: [lpe] mocap timeout
[ INFO] [1495755204.668481501]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755204.700369453]: FCU: [lpe] mocap timeout
[ INFO] [1495755210.879278348]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755211.264016143]: FCU: [lpe] mocap timeout
[ INFO] [1495755218.725513130]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755218.943434150]: FCU: [lpe] mocap timeout
[ WARN] [1495755227.189002741]: GP: No GPS fix
[ INFO] [1495755227.696791910]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755227.730628474]: FCU: [lpe] reinit P
[ INFO] [1495755227.925777150]: FCU: [lpe] tz timeout
[ INFO] [1495755227.941254279]: FCU: [lpe] mocap timeout
[ INFO] [1495755228.137779356]: FCU: [lpe] tz resume
[ INFO] [1495755239.964949719]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755240.136395026]: FCU: [lpe] xy resume
[ INFO] [1495755240.169419029]: FCU: [lpe] reinit P
[ INFO] [1495755240.597015248]: FCU: [lpe] xy timeout
[ INFO] [1495755240.629953250]: FCU: [lpe] tz timeout
[ INFO] [1495755240.660039403]: FCU: [lpe] mocap timeout
[ INFO] [1495755240.827700289]: FCU: [lpe] tz resume
[ INFO] [1495755240.856754870]: FCU: [lpe] land fault, beta 10.92
[ INFO] [1495755249.575948661]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755249.607815696]: FCU: [lpe] mocap timeout
[ WARN] [1495755257.476891836]: GP: No GPS fix
[ INFO] [1495755258.560593120]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755258.625698609]: FCU: [lpe] mocap timeout
[ INFO] [1495755268.176964580]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755268.465531687]: FCU: [lpe] mocap timeout
[ INFO] [1495755278.154280921]: FCU: [lpe] mocap position init: 0.11, 0.18, 0.20 m
[ INFO] [1495755278.355408392]: FCU: [lpe] mocap timeout

Why does the message "[ INFO] [1495755240.597015248]: FCU: [lpe] xy timeout " appear?
Do I have to modify some parameters in the pixhawk?

Regards!!

1 Like

Increase the rate that the mocap is sending, it will timeout if it doesn’t receive data for longer that 0.2 seconds. If you are unable to send it faster, then you can change the parameter in the firmware src/module/local_position_estimator/sensors/mocap.cpp (top of the file).

Hello ! @jgoppert

Thanks for answering. I increase the timeout to 0.5s but I still get the same error, I am using optitrack cameras and offboard control configured by serial radios.

The communication with my drone is done by telemetry to 57600 Baudrate

I am using vrpn_client_ros then when I’m remapping to mavros/mocap/pose it appears in my terminal “mocap timeout”.

I’m stuck on this.

What am I doing wrong?

Regards!!

Are you using the Mocap package and MAVROS on the companion computer of the drone?

If you are running mocap on a ROS Master and publishing mocap to the companion computer of the drone, then try runing mocap in the drone computer and see what happens.

Hello! @abdullahmohiuddin

I am not using companion computer, I am using serial radios, batter said, I have a telemetry in my ubuntu pc with mavros and using vrpn I send the optitrack data to the pixhawk.

I’m stuck with that problem.

My telemetry does not work with 921600 baudrate, only this works with 57600, is it normal?

Greetings and thanks for answering.

I am wrong in my previous comment, I am using two PCs (windos pc and Ubuntu pc) with vrpn I get the optitrack data in my ubuntu pc (ground station) and using the telemetry I send the optitrack data to the pixhawk using the rostopic mocap / pose .

We were having similar problem , when transmitting the Optitrack data from Ground station ubuntu PC to the Companion computer and then to the drone.
The problem was dealt by timestamping the data in the mavros package of the companion computer.

What is timestamping?

How can I know if my timestamping is correct?

I think, Timestamping , is , sort of tagging the current time on the data. So that we know when the data arrived or something. I am not completely sure, about it.
In our case , I think the delay was caused by timestamping the mocap data in the master computer and then using it in the drone computer. This was adding some delay to the mocap data and we were seeing a message of mocap timeout.

@Mario1577 I had similar issue and fixed it by setting the 3DR radios to low latency mode, increasing the air-rate, and lowering the mocap frequency to 100Hz. I hope it helps.

Hello! @jlecoeur

Thanks for answering.

How did you lower the mocap frequency?

Regards and thanks!

In Motive, that is in the left panel where cameras are listed. You can select all cameras by clicking on the first line, then reduce the frame rate with the slider above.

It would better to keep a high camera frame rate and just lower the frequency at which mavlink messages are sent to the drone, but this was an acceptable fix for me.

I lowed the mocap frecuency, I want to low latency mode so I have been reading that this mode and air rate can be changed with APMpanner but my problem is that I am using px4 autopilot and QGC.

There will be another way?

I appreciate your help @jlecoeur

That’s no problem to use Planner just to configure the radios.

Hi Mario
When I connect the drone with serial radios, the same error with u.
When I connect the drone with cable, it not happen.
So i think we need to change a good serial radios.
Different radios with different performance.
I am looking for a good serial radio.

Hi @potato77

I made the recommendations of @jlecoeur and it seems to work well, I am not sure but before when I sent the position data to mocap/pose, the message timeout appeared and the pixhawk emitted a sound (I think it was restarted) but now it does not emit the sound and the timeout message disappears.

Do you have a screenshot of your terminal when you sent the data to mocap / pose using usb?