How do i modify/change base_footprint by program?
Hello everybody!
Thank for your attention!
Dose anyone know how to modify/change the pose by code?
It means I want to change the base_footprint(robot's location).
What I want to do is when I use RFID Tag as a checkpoint.
When the robot Check checkpoint, program will modify the current location of the robot(base_footprint's location).
I had try this. Here is my code :
from nav_msgs.msg import Odometry
import rospy
odom = Odometry()
pose_pub = rospy.Publisher("/odom", Odometry, queue_size=10)
rospy.init_node('test')
odom.pose.pose.position.x = 1
odom.pose.pose.position.y = 1
odom.pose.pose.position.z = 0
while not rospy.is_shutdown():
pose_pub.publish(odom)
It's only response when the code is running.
But when I close the code , the Pose will return to the old data
(I use rostopic info to check /odom, I saw
Publisher: * /mobile_base_nodelet_manager ( http://127.0.0.1:37999/ )
Subscribers: None
Maybe it's why to be this.)
Is there a way to modify the base_footprint's location by code?
What do you mean by 'the Pose will return to the old data'? Is there another publisher of Pose (which is perhaps latched?)?
HI, lucasw!
I only launch the turtlebot minimal.launch.
I use rostopic info to check /odom, I saw
Publisher: * /mobile_base_nodelet_manager ( http://127.0.0.1:37999/ )
Subscribers: None
Maybe it's why to be this.
But I need to find another way to change the Pose.
I want to do is like ('/mobile_base/commands/rest_odometry'). That means it won't return the old data after I run finish.
I have seen <remap from="mobile_base/odom" to="odom"/>.
But when I use rostopic list, I don't see the mobile_base/odom.