Navigation stack problems

asked 2022-09-17 05:40:19 -0600

Heqas gravatar image

Hello everyone, I'm trying to create a navigation stack to create an autonomous AGV for docking. Currently I finished the tutorial on ROS page, but still got a lot problems with setting correct configuration of it. Here are main files that I created:

ROSLAUNCH:

<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name = "robot_name" default = "vc200" />
<include file="$(find rosserial_server)/launch/socket.launch" />
<node name = "rplidarNode" pkg = "rplidar_ros" type = "rplidarNode" output = "screen">
<param name = "serial_port" type = "string" value = "/dev/ttyRPLIDAR0" />
<param name = "serial_baudrate" type = "int" value = "115200" />
<param name = "frame_id" type = "string" value =  "laser" />
<param name = "inverted" type = "bool" value = "false" />
<param name = "angle_compensate" type = "bool" value = "true" />
</node>
<node pkg="tf" type="static_transform_publisher" name="map_to_odom" 
args="0.0 0.0 0.0 0 0 0.0 /map /odom 40" />
<node pkg="tf" type="static_transform_publisher" name="odom_to_basefootprint" 
    args="0.0 0.0 0.0 0 0 0.0 /odom /base_footprint 40" />
<node pkg="tf" type="static_transform_publisher" name="base_footprint_to_base_link"
args="0 0.0 0 0.0 0.0  0.0 /base_footprint /base_link 40" />
<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser_frame"
args="0.2245 0.0 0 1.57 3.14  0.0 /base_link /laser 40" />
<node pkg = "navstack_pub" type = "wheel_odom.py"  name = "odom_to_base_link" output = "screen" />
<!--
<remap from="imu_data" to="IMU" />
<node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
<param name="output_frame" value="odom"/>
<param name="base_footprint_frame" value="base_link"/>
<param name="freq" value="30.0"/>
<param name="sensor_timeout" value="1.0"/>
<param name="odom_used" value="true"/>
<param name="imu_used" value="true"/>
<param name="vo_used" value="false"/>
<param name="gps_used" value="false"/>
<param name="debug" value="false"/>
<param name="self_diagnose" value="false"/>
</node>
-->
<!--<node pkg = "rviz" type = "rviz" name = "rviz" />
 -->
  <node pkg="navstack_pub" type="rviz_2d" name="rviz_2d">
  </node>
  <!--<arg name = "map_file" default = "$(find navstack_pub)/maps/my_map.yaml" />
  -->
  <node pkg = "map_server" name = "map_server" type = "map_server" args = "$(find navstack_pub)/maps/my_map.yaml" />

 <include file = "$(find amcl)/examples/amcl_diff.launch" />

<node pkg = "move_base" type = "move_base" respawn = "false" name = "move_base" output = "screen" >
<rosparam file = "$(find navstack_pub)/param/costmap_common_params.yaml" command = "load" ns = "global_costmap" />
<rosparam file = "$(find navstack_pub)/param/costmap_common_params.yaml" command = "load" ns = "local_costmap" />
<rosparam file = "$(find navstack_pub)/param/local_costmap_params.yaml" command = "load" ns = "local_costmap" />
<rosparam file = "$(find navstack_pub)/param/global_costmap_params.yaml" command = "load" ns = "global_costmap" />
<rosparam file = "$(find navstack_pub)/param/base_local_planner_params.yaml" command = "load" />
 </node>
   </launch>

global_costmap_params.yaml

 global_costmap: 
 global_frame: /map
 robot_base_frame: base_link

 update_frequency: 5.0
 publish_frequency: 0.0

 static_map: true
 rolling_window: false

 footprint_padding: 0.02

local_costmap_params.yaml

local_costmap:
publish_voxel_map: true

 global_frame: odom
 robot_base_frame: base_link

 update_frequency: 5.0
 publish_frequency: 2.0

 static_map: false
 rolling_window: true
 width: 6.0
 height: 6.0
 resolution: 0.025
 origin_x: 0.0
 origin_y: 0.0

base_local_planner_params.yaml

TrajectoryPlannerROS:
acc_lim_th: 3.2 
acc_lim_x: 2.5
acc_lim_y: 2.5

max_vel_x: 0.65
min_vel_x: 0 ...
(more)
edit retag flag offensive close merge delete