Ask Your Question

Is there a reason to create set_pose service in global namespace in EKF node?

asked 2020-07-13 05:47:28 -0500

mpanek06 gravatar image

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_poseservice and topic subscriber using global node handle: ? 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]
 * /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]
 * /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).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-07-14 02:18:12 -0500

Tom Moore gravatar image

Is there any reason that you can't just remap the services?

<node name="ekf_se_odom" ...>
  <remap from="/set_pose" to="/set_pose_odom"/>
edit flag offensive delete link more


Thanks for the reply! Of course I can, I don't know why I didn't think about that... I guess that fact that other services use private namespace fooled me a bit. Thanks!

mpanek06 gravatar image mpanek06  ( 2020-07-14 02:55:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-07-13 05:32:20 -0500

Seen: 65 times

Last updated: Jul 14 '20