Open XXLiu-HNU opened 2 weeks ago
We find the position_xy
from the topic /fmu/in/vehicle_visual_odometry by read the code:examples/cpp/navigation/local_navigation. By the way, the name of the topic is should be "/xxx/out/xxxx" for is a Publisher
?
And how to change the /fmu/out/vehicle_local_position is still confused.
I'm not quite sure what you want to achieve. If you want to have a reference position between all UAVs, why not use the global position directly?
Hi, this work is vary useful for us to change the position of UAVs from GPS to local position. But when use the code we meet some errors.
BackGround: We use RTK for UAV swarm location. But we don't know how to use the same coordinate for each UAV. Becase each UAV treats the starting position as the coordinate origin. So, we want set the local_position by calculating the latitude and longitude height of the UAV. Methods to try: Fristly, we build the lib and it looks like good, and we change the value of "EKF2_EV_CTRL" from 0 to 15 and we run :
ros2 run example_local_navigation_cpp example_local_navigation
, and it also looks like good .But when we use :
ros2 topic echo /fmu/out/vehicle_local_position
, the locai_position is don`t change:and here is the code we use, just change
px4_ros2::VelocityFrame::LocalNED
from topx4_ros2::VelocityFrame::Unkown
, and set the position for test, and here is the code:Desired Effect :
when change
position_xy
andposition_z
, the UAV's local Position is also change . Hope for useful ideas T-T