szebedy / autonomous-drone

This repository intends to enable autonomous drone delivery with the Intel Aero RTF drone and PX4 autopilot. The code can be executed both on the real drone or simulated on a PC using Gazebo. Its core is a robot operating system (ROS) node, which communicates with the PX4 autopilot through mavros. It uses SVO 2.0 for visual odometry, WhyCon for visual marker localization and Ewok for trajectoy planning with collision avoidance.
167 stars 73 forks source link

The question about local position #12

Closed Gatsby23 closed 4 years ago

Gatsby23 commented 5 years ago

When I run the simulation, the drone haven't received the local position message. In offboard_module, there have topic advertise the “ /mavros/local_position/pose ”, but where does it publish ?

szebedy commented 5 years ago

The offboard control only subscribes to /mavros/local_position/pose topic, it does not publish (DroneControl::local_position_cb function will be called with the new pose). The px4 simulator is resonsible for publishing the pose.

Gatsby23 commented 5 years ago

I'm sorry. I'm still confused.... The local position of drone should be estimated by the svo algorithm. Why the px4 simulator publish it ?

szebedy commented 4 years ago

The local position estimated by the svo algorithm is published on the /svo/pose_imu topic. The px4 simulator fuses this information with the IMU data and publishes a better estimate on the /mavros/local_position/pose topic.