I want to move my four-wheel vehicle to the target point, I have adopted ros navigation and now I am having some problems. When I specify the target point in rviz, the four-wheel vehicle does not move. When I look at the rqt graph, I see that the /map_server node is not publishing /map topics to /move_base. The /move_base node also does not publish the topic of cost maps. How can we achieve the function of moving four-wheel vehicles to the target point? Is there any other method besides ros navigation? `
<param name="robot_description" command="$(find xacro)/xacro $(find vehicle_description)/urdf/lhd_vx.urdf" />
<param name="use_gui" value="true"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<node name="map_server" pkg="map_server" type="map_server" args="$(find vehicle_slam)/map/lhd_map.yaml"/>
<!-- AMCL -->
<include file="$(find vehicle_navigation)/launch/amcl.launch" />
<param name="/amcl/initial_pose_x" value="0.0"/>
<param name="/amcl/initial_pose_y" value="0.0"/>
<param name="/amcl/initial_pose_a" value="0.0"/>
<!-- move_base -->
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" >
<rosparam file="$(find vehicle_navigation)/param/gvd/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find vehicle_navigation)/param/gvd/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find vehicle_navigation)/param/gvd/local_costmap_params.yaml" command="load" />
<rosparam file="$(find vehicle_navigation)/param/gvd/global_costmap_params.yaml" command="load" />
<rosparam file="$(find vehicle_navigation)/param/gvd/base_local_planner_params.yaml" command="load"/>
<!-- <remap from="/move_base" to="/m_move_base" /> -->
<!-- <remap from="/n_move_base" to="/move_base"/> -->
</node>
<node type="rviz" name="rviz" pkg="rviz" args="-d $(find vehicle_navigation)/rviz/vehicle_gvd.rviz"/>
`
amcl.launch
`
<node pkg="amcl" type="amcl" name="amcl" clear_params="true">
<param name="min_particles" value="500"/>
<param name="max_particles" value="3000"/>
<param name="kld_err" value="0.02"/>
<param name="update_min_d" value="0.20"/>
<param name="update_min_a" value="0.20"/>
<param name="resample_interval" value="1"/>
<param name="transform_tolerance" value="0.5"/>
<param name="recovery_alpha_slow" value="0.00"/>
<param name="recovery_alpha_fast" value="0.00"/>
<param name="initial_pose_x" value="$(arg initial_pose_x)"/>
<param name="initial_pose_y" value="$(arg initial_pose_y)"/>
<param name="initial_pose_a" value="$(arg initial_pose_a)"/>
<param name="gui_publish_rate" value="50.0"/>
<remap from="scan" to="$(arg scan_topic)"/>
<param name="laser_max_range" value="3.5"/>
<param name="laser_max_beams" value="180"/>
<param name="laser_z_hit" value="0.5"/>
<param name="laser_z_short" value="0.05"/>
<param name="laser_z_max" value="0.05"/>
<param name="laser_z_rand" value="0.5"/>
<param name="laser_sigma_hit" value="0.2"/>
<param name="laser_lambda_short" value="0.1"/>
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="laser_model_type" value="likelihood_field"/>
<param name="odom_model_type" value="diff"/>
<param name="odom_alpha1" value="0.1"/>
<param name="odom_alpha2" value="0.1"/>
<param name="odom_alpha3" value="0.1"/>
<param name="odom_alpha4" value="0.1"/>
<param name="odom_frame_id" value="odom"/>
<param name="base_frame_id" value="base_link"/>
<param name="global_frame_id" value="map"/>
</node>
`
move_base.launch
`
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">
<rosparam file="$(find vehicle_navigation)/param/gvd/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find vehicle_navigation)/param/gvd/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find vehicle_navigation)/param/gvd/local_costmap_params.yaml" command="load" />
<rosparam file="$(find vehicle_navigation)/param/gvd/global_costmap_params.yaml" command="load" />
<rosparam file="$(find vehicle_navigation)/param/gvd/base_local_planner_params.yaml" command="load"/>
<param name="wait_for_map" value="true"/>
<!-- <remap from="/move_base" to="/m_move_base" /> -->
<remap from="/move_base" to="/move_base" />
<!-- <remap from="/n_move_base" to="/move_base"/> -->
</node>
`
costmap_common_params.yaml
obstacle_range: 15
raytrace_range: 8
footprint: [ [2.6, 1.4],[2.6, -1.4],[-2.6, -1.4],[-2.6, 1.4]]
#robot_radius: 0.105
inflation_radius: 0.5
cost_scaling_factor: 3.0
map_type: costmap
observation_sources: laser_scan_sensor
scan: {sensor_frame: lidar_link, data_type: LaserScan, topic: laser_scan, marking: true, clearing: true}
global_costmap_params.yaml
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 1.0
publish_frequency: 1.0
static_map: true
transform_tolerance: 0.5
plugins:
- { name: static_layer, type: "costmap_2d::StaticLayer" }
- { name: obstacle_layer, type: "costmap_2d::ObstacleLayer" }
- { name: inflation_layer, type: "costmap_2d::InflationLayer" }
- { name: voronoi_layer, type: "costmap_2d::VoronoiLayer" }
local_costmap_params.yaml
local_costmap:
global_frame: odom
robot_base_frame: base_footprint
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
static_map: false
rolling_window: true
width: 5
height: 5
resolution: 0.05
base_local_planner_params.yaml
TrajectoryPlannerROS:
max_vel_x: 0.18
min_vel_x: 0.08
max_vel_theta: 1.0
min_vel_theta: -1.0
min_in_place_vel_theta: 1.0
acc_lim_x: 1.0
acc_lim_y: 0.0
acc_lim_theta: 0.6
xy_goal_tolerance: 0.10
yaw_goal_tolerance: 0.05
holonomic_robot: false
sim_time: 0.8
vx_samples: 18
vtheta_samples: 20
sim_granularity: 0.05