global and local planners don't update calculated trajectory
I've set up a system comprising of:
- A laser scanner (Hokuyo URG-04LX)
- Remote computer connected to laser scanner running
roscore
,hokuyo_node
andlaser_scan_matcher
- A local computer running
gmapping
andrviz
and am trying to make move_base
run on top of it all on the local machine. I went through Robot Setup, Navigation Tuning Guide, Using rviz with Navigation Stack and all related questions here. It seems my basic setup is already mostly correct, but there is still something missing as neither global nor local planners update calculated trajectory on robot pose change.
My setup is mostly as described in Robot Setup Tutorial, i.e.:
costmap_common_params.yaml
:
obstacle_range: 2.5
raytrace_range: 3.0
robot_radius: 0.1
inflation_radius: 0.3
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: /laser, data_type: LaserScan, topic: /scan, marking: true, clearing: true}
global_costmap_params.yaml
:
global_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 5.0
static_map: true
local_costmap_params.yaml
:
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 2.0
height: 2.0
resolution: 0.05
base_local_planner_params.yaml
:
TrajectoryPlannerROS:
max_vel_x: 0.1 #m/s
min_vel_x: 0.0
escape_vel: -0.1
max_rotational_vel: 0.1 #rad/s
min_in_place_rotational_vel: 0.0
y_vels: [-0.1, -0.0, 0.0, 0.1]
acc_lim_th: 1.0
acc_lim_x: 1.0 #m/s2
acc_lim_y: 1.0
holonomic_robot: true
move_base.launch
:
<launch>
<master auto="start"/>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find my_robot)/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find my_robot)/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find my_robot)/local_costmap_params.yaml" command="load" />
<rosparam file="$(find my_robot)/global_costmap_params.yaml" command="load" />
<rosparam file="$(find my_robot)/base_local_planner_params.yaml" command="load" />
</node>
</launch>
When I select a goal using rviz
local and global trajectories get nicely drawn, but they don't change when I carry the "robot" around, only when new goal is being set. Besides, all I'm getting on /cmd_vel topic is the below output (so it would cause a real robot spin around endlessly).
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: -0.05
---
Both localization and odometry work as desired. Is there anything missing?