Hi,
I tried amcl & movebase with namespace. Ran into the following error.
The robot navigates to the goal position but does not avoid obstacles. Instead it just tries to run through obstacles.
roswtf
Found 1 error(s).
ERROR The following nodes should be connected but aren’t:
- /rosbot2/move_base->/rosbot2/move_base (/rosbot2/move_base/local_costmap/footprint)
- /rosbot2/move_base->/rosbot2/move_base (/rosbot2/move_base/global_costmap/footprint)
launch file
<node if="$(arg use_rosbot)" pkg="rplidar_ros" type="rplidarNode" name="rplidar_2">
<param name="angle_compensate" type="bool" value="true"/>
<param name="serial_baudrate" type="int" value="115200"/><!--model A2 (ROSbot 2.0)-->
<param name="frame_id" type="string" value="rosbot2/laser" />
</node>
<node if="$(arg use_rosbot)" pkg="tf" type="static_transform_publisher" name="laser_broadcaster_2" args="0 0 0.1 3.14 0 0 rosbot2/base_link rosbot2/laser 100" />
<node if="$(arg use_rosbot)" pkg="tutorial_pkg" type="drive_controller_node" name="drive_controller_2"/>
<node pkg="teleop_twist_keyboard" type="teleop_twist_keyboard.py" name="teleop_twist_keyboard_2" output="screen"/>
#amcl
<param name="global_frame_id" value="map"/>
<remap from="static_map" to="/static_map"/>
<param name="odom_frame_id" value="rosbot2/odom"/>
<param name="odom_model_type" value="diff-corrected"/>
<param name="base_frame_id" value="rosbot2/base_link"/>
<param name="update_min_d" value="0.1"/>
<param name="update_min_a" value="0.2"/>
<param name="min_particles" value="100"/>
<param name="max_particles" value="1000"/>
<!--<param name="update_min_d" value="0.2"/>
<param name="update_min_a" value="0.2"/>
<param name="min_particles" value="100"/>
<param name="max_particles" value="5000"/>
<param name="initial_pose_x" value="0"/> #-1.2
<param name="initial_pose_y" value="0"/> #4.55
<param name="initial_pose_a" value="0"/> #1.55 -->
<param name="use_map_topic" value="true"/>
<remap from="map" to="/map"/>
<param name="tf_broadcast" value="true" />
<param name="scan" value="rosbot2/scan"/>
</node>
#movebase
<node pkg="move_base" type="move_base" name="move_base" output="log">
<rosparam file="$(find tutorial_pkg)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find tutorial_pkg)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find tutorial_pkg)/config/local_costmap_params.yaml" command="load" />
<rosparam file="$(find tutorial_pkg)/config/global_costmap_params.yaml" command="load"/>
<rosparam file="$(find tutorial_pkg)/config/trajectory_planner.yaml" command="load" />
<param name="controller_frequency" value="10.0" />
<remap from="map" to="/map" />
<!--<rosparam file="$(find tutorial_pkg)/config/base_local_planner_params.yaml" command="load" />
<param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" />-->
</node>
config files
costmap_common_params.yaml
obstacle_range: 2.5
raytrace_range: 4
footprint: [[0.12, 0.14], [0.12, -0.14], [-0.12, -0.14], [-0.12, 0.14]]
map_topic: /map
subscribe_to_updates: true
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: rosbot2/laser, data_type: LaserScan, topic: rosbot2/scan, marking: true, clearing: true}
global_frame: map
robot_base_frame: rosbot2/base_link
always_send_full_costmap: true
global_costmap:
update_frequency: 5
publish_frequency: 5
transform_tolerance: 0.5
width: 15
height: 15
origin_x: -7.5
origin_y: -7.5
rolling_window: false
inflation_radius: 0.2
resolution: 0.05
local_costmap:
update_frequency: 5
publish_frequency: 5
transform_tolerance: 0.50
rolling_window: true
width: 3
height: 3
origin_x: -1.5
origin_y: -1.5
resolution: 0.05
inflation_radius: 0.2
TrajectoryPlannerROS:
max_vel_x: 0.2
min_vel_x: 0.1
max_vel_theta: 0.35
min_vel_theta: -0.35
min_in_place_vel_theta: 0.25
acc_lim_theta: 0.25
acc_lim_x: 2.5
acc_lim_Y: 2.5
holonomic_robot: false
meter_scoring: true
xy_goal_tolerance: 0.15
yaw_goal_tolerance: 0.25