Posted by
baike960 on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Some-confusion-about-navigation-tp3692.html
Hi Mathieu,
Thank you for the amazing work. I ran the rtabmap project and got it working with point_cloud showing on rviz and then I started working on the navigation system following the tutorial in this link.
http://wiki.ros.org/navigation/Tutorials/RobotSetup . I am only using one Kinect v2, so I only published the point_cloud information through ROS successfully. I am new to ROS so I did not know exactly what values to replace in all those configuration files. Luckily I found your discussion here that helps a lot.
http://official-rtab-map-forum.206.s1.nabble.com/Autonomous-Navigation-td801.html#a820 I used your files and tried to adapt the files by myself. The adapted ones are shown as follow and the rest ones are the same as yours:
costmap_common_params.yaml
footprint: [[ 0.3, 0.3], [-0.3, 0.3], [-0.3, -0.3], [ 0.3, -0.3]]
footprint_padding: 0.02
inflation_layer:
inflation_radius: 0.5
transform_tolerance: 2
obstacle_layer:
obstacle_range: 2.5
raytrace_range: 3
max_obstacle_height: 0.4
track_unknown_space: true
observation_sources: point_cloud_sensor
point_cloud_sensor: {
data_type: PointCloud2,
topic: /rtabmap/cloud_map,
expected_update_rate: 0.5,
marking: true,
clearing: true,
min_obstacle_height: -99999.0,
max_obstacle_height: 99999.0}
navigation.launch
<launch>
<arg name="scan_topic" default="/scan"/>
<arg name="map_topic" default="/map"/>
<remap from="cloud_in" to="/rtabmap/cloud_map"/>
<remap from="map" to="/rtabmap/grid_map"/>
<node pkg="move_base" type="move_base" respawn="true" name="move_base" output="screen">
<rosparam file="/home/autodriving/navigation_ws/src/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="/home/autodriving/navigation_ws/src/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="/home/autodriving/navigation_ws/src/local_costmap_params.yaml" command="load" ns="local_costmap" />
<rosparam file="/home/autodriving/navigation_ws/src/global_costmap_params.yaml" command="load" ns="global_costmap"/>
<rosparam file="/home/autodriving/navigation_ws/src/base_local_planner_params.yaml" command="load" />
</node>
</launch>
And then I followed your steps for launching the related programs. After this step, roslaunch navigation.launch map_topic:=/rtabmap/grid_map,
the terminal shows the message:
SUMMARY
========
PARAMETERS
* /move_base/NavfnROS/allow_unknown: True
* /move_base/NavfnROS/visualize_potential: False
* /move_base/TrajectoryPlannerROS/acc_lim_theta: 4
* /move_base/TrajectoryPlannerROS/acc_lim_x: 0.75
* /move_base/TrajectoryPlannerROS/acc_lim_y: 0.75
* /move_base/TrajectoryPlannerROS/angular_sim_granularity: 0.05
* /move_base/TrajectoryPlannerROS/gdist_scale: 0.8
* /move_base/TrajectoryPlannerROS/holonomic_robot: True
* /move_base/TrajectoryPlannerROS/latch_xy_goal_tolerance: True
* /move_base/TrajectoryPlannerROS/max_vel_theta: 0.5
* /move_base/TrajectoryPlannerROS/max_vel_x: 0.5
* /move_base/TrajectoryPlannerROS/meter_scoring: True
* /move_base/TrajectoryPlannerROS/min_in_place_vel_theta: 0.25
* /move_base/TrajectoryPlannerROS/min_vel_theta: -0.5
* /move_base/TrajectoryPlannerROS/min_vel_x: 0.24
* /move_base/TrajectoryPlannerROS/occdist_scale: 0.01
* /move_base/TrajectoryPlannerROS/pdist_scale: 0.7
* /move_base/TrajectoryPlannerROS/publish_cost_grid_pc: False
* /move_base/TrajectoryPlannerROS/sim_granularity: 0.025
* /move_base/TrajectoryPlannerROS/sim_time: 1.5
* /move_base/TrajectoryPlannerROS/vtheta_samples: 20
* /move_base/TrajectoryPlannerROS/vx_samples: 12
* /move_base/TrajectoryPlannerROS/xy_goal_tolerance: 0.25
* /move_base/TrajectoryPlannerROS/yaw_goal_tolerance: 0.25
* /move_base/base_global_planner: navfn/NavfnROS
* /move_base/controller_frequency: 10.0
* /move_base/global_costmap/always_send_full_costmap: False
* /move_base/global_costmap/footprint: [[0.3, 0.3], [-0....
* /move_base/global_costmap/footprint_padding: 0.02
* /move_base/global_costmap/global_frame: map
* /move_base/global_costmap/inflation_layer/inflation_radius: 0.5
* /move_base/global_costmap/obstacle_layer/max_obstacle_height: 0.4
* /move_base/global_costmap/obstacle_layer/observation_sources: point_cloud_sensor
* /move_base/global_costmap/obstacle_layer/obstacle_range: 2.5
* /move_base/global_costmap/obstacle_layer/point_cloud_sensor/clearing: True
* /move_base/global_costmap/obstacle_layer/point_cloud_sensor/data_type: PointCloud2
* /move_base/global_costmap/obstacle_layer/point_cloud_sensor/expected_update_rate: 0.5
* /move_base/global_costmap/obstacle_layer/point_cloud_sensor/marking: True
* /move_base/global_costmap/obstacle_layer/point_cloud_sensor/max_obstacle_height: 99999.0
* /move_base/global_costmap/obstacle_layer/point_cloud_sensor/min_obstacle_height: -99999.0
* /move_base/global_costmap/obstacle_layer/point_cloud_sensor/topic: /rtabmap/cloud_map
* /move_base/global_costmap/obstacle_layer/raytrace_range: 3
* /move_base/global_costmap/obstacle_layer/track_unknown_space: True
* /move_base/global_costmap/plugins: [{'type': 'rtabma...
* /move_base/global_costmap/publish_frequency: 2
* /move_base/global_costmap/robot_base_frame: base_footprint
* /move_base/global_costmap/transform_tolerance: 2
* /move_base/global_costmap/update_frequency: 2
* /move_base/local_costmap/footprint: [[0.3, 0.3], [-0....
* /move_base/local_costmap/footprint_padding: 0.02
* /move_base/local_costmap/global_frame: odom
* /move_base/local_costmap/height: 3.0
* /move_base/local_costmap/inflation_layer/inflation_radius: 0.5
* /move_base/local_costmap/obstacle_layer/max_obstacle_height: 0.4
* /move_base/local_costmap/obstacle_layer/observation_sources: point_cloud_sensor
* /move_base/local_costmap/obstacle_layer/obstacle_range: 2.5
* /move_base/local_costmap/obstacle_layer/point_cloud_sensor/clearing: True
* /move_base/local_costmap/obstacle_layer/point_cloud_sensor/data_type: PointCloud2
* /move_base/local_costmap/obstacle_layer/point_cloud_sensor/expected_update_rate: 0.5
* /move_base/local_costmap/obstacle_layer/point_cloud_sensor/marking: True
* /move_base/local_costmap/obstacle_layer/point_cloud_sensor/max_obstacle_height: 99999.0
* /move_base/local_costmap/obstacle_layer/point_cloud_sensor/min_obstacle_height: -99999.0
* /move_base/local_costmap/obstacle_layer/point_cloud_sensor/topic: /rtabmap/cloud_map
* /move_base/local_costmap/obstacle_layer/raytrace_range: 3
* /move_base/local_costmap/obstacle_layer/track_unknown_space: True
* /move_base/local_costmap/origin_x: 0
* /move_base/local_costmap/origin_y: 0
* /move_base/local_costmap/plugins: [{'type': 'costma...
* /move_base/local_costmap/publish_frequency: 2
* /move_base/local_costmap/resolution: 0.025
* /move_base/local_costmap/robot_base_frame: base_footprint
* /move_base/local_costmap/rolling_window: True
* /move_base/local_costmap/transform_tolerance: 2
* /move_base/local_costmap/update_frequency: 2
* /move_base/local_costmap/width: 3.0
* /rosdistro: kinetic
* /rosversion: 1.12.7
NODES
/
move_base (move_base/move_base)
ROS_MASTER_URI=
http://localhost:11311core service [/rosout] found
process[move_base-1]: started with pid [7788]
[ WARN] [1503652743.735908890]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 0.100748 timeout was 0.1.
1) How should I fix it?
The thing is that I do not have a physical robot right now and I am thinking about doing a navigation simulation on the computer using only the Kinect v2 by running the move_base on a URDF robot model I created on RVIZ. 2) If my plan is feasible, what should my robot configuration file be ?
3) This maybe a silly question. Since move_base allows a path to a destination to be found, do I need to enter some sort of coordinates or images of the destination?
Sorry for the long question and thank you in advance!