Reputation: 1
I have Ubuntu 20.04 with ROS 1 Noetic installed. I'm using an A1 RP Lidar and a Roboteq controller. I want it to be able to run autonomously, so I have implemented SLAM. I launch the following nodes: the RPLidar node, the Roboteq node, the odometry node, the map_server node (as I have a pre-made map), the AMCL, and the move base launch file. However, when using rviz, I try to give a 2D goal, but the AGV can't reach it if the point is not in the same direction and forward. In such cases, it rotates around itself. When im using teleop_twist_keuboard it works just fine.
Here is the local costmap params:
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
width: 4.0
height: 4.0
resolution: 0.05
static_map: false
rolling_window: true
here are the global costmap params:
global_costmap:
global_frame: map
robot_base_frame: base_link
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
static_map: true
here are the base local planner params
:your text
TrajectoryPlannerROS:
Robot Configuration Parameters max_vel_x: 0.22 min_vel_x: -0.22
max_vel_y: 0.0 min_vel_y: 0.0
The velocity when robot is moving in a straight line max_vel_trans: 0.22 min_vel_trans: 0.11
max_vel_theta: 2.75 min_vel_theta: 1.37
acc_lim_x: 2.5 acc_lim_y: 0.0 acc_lim_theta: 3.2
Goal Tolerance Parametes xy_goal_tolerance: 0.05 yaw_goal_tolerance: 0.17 latch_xy_goal_tolerance: false
Forward Simulation Parameters sim_time: 1.5 vx_samples: 20 vy_samples: 0 vth_samples: 40 controller_frequency: 10.0
Trajectory Scoring Parameters path_distance_bias: 32.0 goal_distance_bias: 20.0 occdist_scale: 0.02 forward_point_distance: 0.325 stop_time_buffer: 0.2 scaling_speed: 0.25 max_scaling_factor: 0.2
Oscillation Prevention Parameters oscillation_reset_dist: 0.05
`Debugging publish_traj_pc : true publish_cost_grid_pc: true
here are the costmap common param
map_type: costmap obstacle_range: 2.5 raytrace_range: 3 transform_tolerance: 0.2 footprint: [[0.2225, 0.2045], [0.2225, -0.2045], [-0.2225, -0.2045], [-0.2225, 0.2045]] #robot_radius: 0.0 inflation_radius: 0.55 observation_sources: scan scan: {sensor_frame: scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}
here is the amcl launch file
<!-- Run AMCL -->
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<param name="odom_frame_id" value="odom"/>
<param name="base_frame_id" value="base_link"/>
<param name="global_frame_id" value="map"/>
<param name="min_particles" value="100"/>
<param name="max_particles" value="2000"/>
<param name="initial_pose_x" value="0.0"/>
<param name="initial_pose_y" value="0.0"/>
<param name="initial_pose_a" value="0.0"/>
<param name="laser_min_range" value="-1.0"/>
<param name="laser_max_range" value="-1.0"/>
<param name="laser_max_beams" value="30"/>
<param name="gui_publish_rate" value="10.0"/>
<!-- Remap the laser topic -->
<remap from="map" to="/scan"/>
</node>
<!-- Transform broadcaster for the static transform between map and odom if needed -->
<!-- You might need to adjust or remove this depending on your setup -->
<node pkg="tf" type="static_transform_publisher" name="odom_to_map_broadcaster"
args="0 0 0 0 0 0 1 map odom 100"/>
and here is the move base launch file
-->
<param name="base_global_planner" value="$(arg base_global_planner)"/>
<param name="base_local_planner" value="$(arg base_local_planner)"/>
<param name="recovery_behavior_enabled" value="true"/>
<param name="controller_frequency" value="1.0"/>
<rosparam file="/home/ubuntu/psybot_ws/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="/home/ubuntu/psybot_ws/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="/home/ubuntu/psybot_ws/local_costmap_params.yaml" command="load" />
<rosparam file="/home/ubuntu/psybot_ws/global_costmap_params.yaml" command="load" />
<rosparam file="/home/ubuntu/psybot_ws/base_local_planner_params.yaml" command="load" />
This is the rostopic list
/Encoder1 /Encoder2 /Feedback1 /Feedback2 /VAR /amcl/parameter_descriptions /amcl/parameter_updates /amcl_pose /battery_amps /cmd_vel /diagnostics /fault_flag /feedback /hall_count1 /hall_count2 /hall_speed /initialpose /map /map_metadata /map_updates /motor_amps /motor_command /move_base/DWAPlannerROS/cost_cloud /move_base/DWAPlannerROS/global_plan /move_base/DWAPlannerROS/local_plan /move_base/DWAPlannerROS/parameter_descriptions /move_base/DWAPlannerROS/parameter_updates /move_base/DWAPlannerROS/trajectory_cloud /move_base/NavfnROS/plan /move_base/cancel /move_base/current_goal /move_base/feedback /move_base/global_costmap/costmap /move_base/global_costmap/costmap_updates /move_base/global_costmap/footprint /move_base/global_costmap/inflation_layer/parameter_descriptions /move_base/global_costmap/inflation_layer/parameter_updates /move_base/global_costmap/obstacle_layer/parameter_descriptions /move_base/global_costmap/obstacle_layer/parameter_updates /move_base/global_costmap/parameter_descriptions /move_base/global_costmap/parameter_updates /move_base/global_costmap/static_layer/parameter_descriptions /move_base/global_costmap/static_layer/parameter_updates /move_base/goal /move_base/local_costmap/costmap /move_base/local_costmap/costmap_updates /move_base/local_costmap/footprint /move_base/local_costmap/inflation_layer/parameter_descriptions /move_base/local_costmap/inflation_layer/parameter_updates /move_base/local_costmap/obstacle_layer/parameter_descriptions /move_base/local_costmap/obstacle_layer/parameter_updates /move_base/local_costmap/parameter_descriptions /move_base/local_costmap/parameter_updates /move_base/parameter_descriptions /move_base/parameter_updates /move_base/recovery_status /move_base/result /move_base/status /move_base_simple/goal /odom /particlecloud /power /read /rosout /rosout_agg /scan /tf /tf_static /volts
`
i tried changing the parameters
Upvotes: 0
Views: 58