I am able to obtain VIO information (nav_msg/Odometry) from Intel Realsense T265 camera in ROS, but I fail to see the correct message under /mavros/local_position/odom.
- Flight controller: Pixracer with PX4 firmware
- Onboard computer: Nvidia Xavier NX running Ubuntu 18.04 LTS with ROS melodic
- remote PC: HP Laptop running Ubuntu 16.04 LTS with ROS kinetic
Communication: PC to Onboard (WIFI), Onboard to FC (serial port)
What I do
I firstly run the Realsense Camera Node in my onboard computer:
roslaunch realsense_camera rs_t265.launch
which gives me /camera/odom/sample (nav_msgs/Odometry).
Then, I use my scripts to subscribe to the above odom topic and re-publish it to mavros/odometry/out as suggested in https://docs.px4.io/master/en/ros/external_position_estimation.html. I set the frame_id and child_frame_id to be odom and base_link, respectively.
After that, I did some tf broadcasting to make the tf like below.
When I check the /mavros/odometry/out and /camera/odom/sample, they are 100% correct. I think I should expect also a correct message from /mavros/local_position/odom, but it looks totally wrong. As you can see blow, the x, y are always zero and z is some random things (always changing and does not start from 0).
My EKF2 parameters are:
EKF2_AID_MASK = 24 (I also tried 280 which is vision pose, orientation and velocity)
- Why /mavros/local_position/odom gives nonsense data? (x,y=0, z=random value and always changing)? I think it is purely relying on IMU if there is no external localization, it is true to be inaccurate, but why not making sense?
- I think I already follow the instruction, but still cannot use the VIO for pose estimation for my quadcopter. So, which part might I do wrong?
Thanks for any advice and suggestions, I am also very happy to provide further details. THanks in advance!