Set x,y goals and move the robot
I have a robot on mecanum wheels and I installed on it a sensor able to provide x,y,z coordinates of its position at 10Hz. Morever, I placed four beacons in the four corners of the room in order to create a map.
I created a ROS node to publish /odom
information:
rostopic echo /odom
header:
seq: 3311
stamp:
secs: 1584301150
nsecs: 996412185
frame_id: "odom"
child_frame_id: "base_link"
pose:
pose:
position:
x: 2.877
y: 3.779
z: 0.0
orientation:
x: -0.018200000748
y: 0.033900000155
z: 0.00289999996312
w: 0.999199986458
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist:
twist:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.00457195335154
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
This is my TF tree:
Then, I run move_base
:
rosrun move_base move_base
[ INFO] [1584298281.544211877]: global_costmap: Using plugin "obstacle_layer"
[ INFO] [1584298281.550544640]: Subscribed to Topics:
[ INFO] [1584298281.556913732]: global_costmap: Using plugin "inflation_layer"
[ INFO] [1584298281.598466274]: local_costmap: Using plugin "obstacle_layer"
[ INFO] [1584298281.601248532]: Subscribed to Topics:
[ INFO] [1584298281.609893696]: local_costmap: Using plugin "inflation_layer"
[ INFO] [1584298281.664725185]: Created local_planner base_local_planner/TrajectoryPlannerROS
[ INFO] [1584298281.672399153]: Sim period is set to 0.05
[ WARN] [1584298281.677701194]: Trajectory Rollout planner initialized with param meter_scoring not set. Set it to true to make your settings robust against changes of costmap resolution.
[ INFO] [1584298281.865343424]: Recovery behavior will clear layer 'obstacles'
[ INFO] [1584298281.872604788]: Recovery behavior will clear layer 'obstacles'
[ INFO] [1584298281.996921593]: odom received!
and I publish the first goal:
rostopic pub /move_base_simple/goal geometry_msgs/PoseStamped '{header: {stamp: now, frame_id: "base_link"}, pose: {position: {x: 1.0, y: 2.2, z: 0.0}, orientation: {w: 1.0}}}'
I can see the robot IMMEDIATELY change its position in RVIZ, but if I read thecmd_vel
topic, I always find ZERO values.
Shouldn't move_base
update thecmd_vel
topic to send the values to a robot controller?
I just get this from cmd_vel
:
linear:
x: -0.1
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
---
linear:
x: -0.1
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
So is this related to #q340495?
If so, it would be nice to post a final answer/comment there so future readers know what you eventually ended up using.
It is the same project, but my previous topic is still open because I didnt find a correct solution, yet. I just want to explore this solution and to do so I need to know how to use the waypoint with this method. This topic it is just a branch of the previous one.