Fix bug with ENU odom being published on odom_local_ned topic#4631
Fix bug with ENU odom being published on odom_local_ned topic#4631nikola-j wants to merge 3 commits intomicrosoft:mainfrom
Conversation
…g ``'coordinate_system_enu': True`, publish enu messages on a new seprate topic
|
@nikola-j Based on your changes, I think that the original version can meet your request unless you want both enu_odom and ned_odom at the same time. The enu and ned should not exist at the same time at least by original intention. |
|
It doesn't make sense to have a topic called When using |
If you want NED, set rosparam world_frame_id as "world_ned" (default). and Optionally, you could decide ENU or NED by setting coordinate_system_enu directly. Names of topic/service depend on parameters you set. But the names are not important but what the topic data is. |
|
Okay, thank you, that makes sense, setting the |
Actually, as AirsimROSWrapper::initialize_ros() shows, odom_frame_id is independent of coordinate_system_enu. You can set odom_frame_id as any name you expect. |
|
I think the only way to solve this is to either change the PD controller to support enu based navigation, or to add a new publisher for ned data. The easier fix is to add a ned publisher when there is no ned publisher. |
|
1.It is not reasonable to modify airsim_ros_wrapper, because this goes against the airsim_ros framework. You only see odom, not many other topics/services/TFs. If some changes must be done, it should be pd_position_controller_simple. |
|
Could you share me your project or tell me how to create similar one ? I will try it. |
|
Thanks, sure:
|
Checked pd_position_controller_simple.cpp, I guess that PIDPositionController only supports NED mode. |
Fixes: #4629
About
When using
'coordinate_system_enu': True, the messages published toodom_local_nedtopic will be in ENU frame, this confuses the pd_position_controller_simple node which listens to odom_local_ned for controlling the drone.This PR fixes that by publishing ENU messages on a new seprate topic
odom_local_enuwhen coordinate system is set to ENU.How Has This Been Tested?
Set coordinate system to ENU, issue
/airsim_node/local_position_goalservice.Screenshots (if appropriate):