Offboard and Optitrack external position

Dear everybody,
I am Fabrizio and I have some issues with offboard control + Optitrack.
This is what I did:

  1. Uploaded px4fmu-v2_lpe.px4 firmware (ver. 1.6.0 RC1)
  2. Set ```ATT_EXT_HDG_M`` to value 2 (I didn’t find CBRK_NO_VISION parameter)
  3. roslaunch px4.launch
  4. rosrun topic_tools relay /vrpn_client_node/chirottero/pose /mavros/mocap/pose

Mocap seems running… In fact on px4 node I have:
[ INFO] [1485972859.526161408]: FCU: [lpe] mocap position init: 0.19, 1.55, 1.98 m

  1. I start to send many points (20 Hz) to /mavros/setpoint_positions/local with a custom ros node (following the “offboard example found on dev.px4”)

If I arm and start the offboard phase on Z I have the following result:

my quadcopter fly away and I don’t know how to understand what’s wrong…

Someone has suggestions?

Thanks!
Fabrizio

Hi Fabrizio,
take a look at lpe fusion parameter. There is a check on “pub agl as lpos down”…

Roberto

Thanks a lot!
I found the LPE_Z_PUB parameter was set to 1 meter!

I also tried to reset everything and re-upload firmare with default parameters. The strange thing now is that I don’t see the position on /mavros/local_position/pose but on /mavros/global_position/local (or global).

Is this normal? How can I know which kind of topic to use to set positions from “offboard” mode?

Fabrizio

I don’t know…ask Rappana…