Is there a reason to create set_pose service in global namespace in EKF node?
I'm using robot_localization package under melodic to fuse odom, IMU and GPS RTK data. I followed the tutorials and use two EKFs and navsat_transform
node.
I was wondering if there is any reason for creating the /set_pose
service and topic subscriber using global node handle: https://github.com/cra-ros-pkg/robot_... ? My problem is that having two EKFs running I cannot use /set_pose
service for both of them because only one is available (probably due to naming clash?):
root@2c1c12b2e1b7:~# rosnode info /ekf_se_odom -q
--------------------------------------------------------------------------------
Node [/ekf_se_odom]
...
Services:
* /ekf_se_odom/enable
* /ekf_se_odom/get_loggers
* /ekf_se_odom/set_logger_level
* /ekf_se_odom/toggle
root@2c1c12b2e1b7:~# rosnode info /ekf_se_map -q
--------------------------------------------------------------------------------
Node [/ekf_se_map]
...
Services:
* /ekf_se_map/enable
* /ekf_se_map/get_loggers
* /ekf_se_map/set_logger_level
* /ekf_se_map/toggle
* /set_pose
I could use the /set_pose
topic for this purpose, but one of the EKFs should get the message with header.frame_id="map"
and the other with header.frame_id="odom"
.
The reason why I want to do it is I'm manually setting datum for navsat_transform
after moving some distance to determine heading based on GPS. My IMU does not provide reliable heading after start hence I want to deduce it from short straight line motion and set datum and then I have to reset the EKFs since /set_datum
also resets the GPS-based odometry published by navsat_transfrom
(which would cause jumps in the ekf_se_map
).