How to use pose for `move_base` to produce `cmd_vel`?
From the Wiki page of move_base
, it seems that move_base
obtains the pose estimation of a robot by a tf
from map
to odom
, which is often published by amcl
. However, in my application, I use a motion predictor to predict the future pose of the robot, and I want to use that future pose as a basis for my move_base
computation (i.e. use the future pose instead of the current pose estimated by amcl
).
The message of my future pose is geometry_msgs/PoseWithCovarianceStamped
, which is not a tf. How do I control the robot using geometry_msgs/PoseWithCovarianceStamped
instead of tf for move_base
?
There are several solutions that I have tried:
One alternative is to replace the tf publisher in
amcl
with a custom tf publisher (frommap
toodom
) using the future pose, but it causes the laser scan misaligned.Another alternative is to keep the original
amcl
code unchanged, and write a tf publisher (frommap
toodom_future
frame) using the future pose . This approach seems realistic, because it does not affect localization and sensor readings, but I could not find the pieces of code inmove_base
to expect the frameodom_future
instead ofodom
.
Could somebody provide me some guidance?