Unable to hover Crazyflie 2.0 flashed with PX4 in Offboard mode

#1

Hi,

I am new to ROS and drone things.
I am trying to hover crazyflie 2.0 flashed with PX4 in offboard mode, but unable to make it flying successful. I am using Ubuntu 16.04 with Kinetic ROS and Windows 10 for OptiTrack Motive software.

For better understanding I am mentioning what I did so far in the following steps -

step-1: flashed crazyflie with latest PX4 firmware and calibrated via QGC. configured cfbridge and connected to crazyflie 2.0 via mavros. I did this by following this.

step-2: getting position and orientation data from optitrack motive to mavros using vrpn_client_ros. below picture shows the co-ordinate of optitrack and mavros respectively.

step-3: feeding mocap data to crazyflie using LPE estimator. In QGC, lpe settings are
SYS_COMPANION - Crazyflie (Syslink)
SYS_MC_EST_GROUP - local_position_estimator
ATT_EXT_HDG_M - Motion Capture
LPE_FUSION - 16 (not to use GPS and barometer)

step-4: relay the mocap data to the flight controller
rosrun topic_tools relay /vrpn_client_node/uav/pose /mavros/mocap/pose
output of rostopic echo /mavros/mocap/pose looks like

step-5: not getting any local pose info from rostopic echo /mavros/local_position/pose command after publishing data to /mavros/mocap/pose topic. I can only see it on QGroundControl. Here it is -

why is it showing lpe mocap timeout info everytime?

step-6: finally I was trying to hover crazyflie at (0, 0, 0.5) (in meter unit) with mavros offboard example (code url). here is the video of offboard hovering which is not perfect at all. it takes off and flies to any direction, it does not even get a desired altitude. this is the log of my flying.

here are few doubts in my mind why drone is not hovering-

  1. mavros co-ordinate - is it correct?
  2. rostopic echo /mavros/local_position/pose - why is it not providing any pose information
  3. lpe mocap timeout - why is it appearing everytime?
  4. For crazyflie, TELEM2 port is not working. so default is crazyflie syslink. is it ok?

somebody please help me. I got struck here. thanks! @LorenzMeier @Jaeyoung-Lim @TSC21 @mhkabir