tricycle model navigation stack issue

asked 2016-04-06 11:26:23 -0500

TeddyBear gravatar image

updated 2016-05-22 18:57:00 -0500

130s gravatar image

Hello,

I have created a tricycle model (2 wheels+ 1 front steering wheel) driven with the "Tricycle" Ros plugins (gazebo_ros_tricycle_drive.cpp). The model seems to work and I have been able to control it with RQT with odom and cmd_vel topics, following some tutorials. I have included a Kinect in my model and it also seems to work well.

However, when I try to use the navigation stack and set goal commands on Rviz, there are some issues. The tricycle robot always rotates too much - it is making some weird in-place rotations when it needs to rotate and cannot reach its goal. It can only reach it properly when going in a straight direction with no rotations. I tried to change some parameters on the Ros planner or in the plugin but evenif it improves the results a bit, the model is still not acceptable.

I really don't know what to do. The recovery behaviors are put to "false" and I haven't activated the Navfn ros tool. Could it come from the fact that my robot is not a differential kind of robot ? Any help would be really appreciated.

Nav.launch file :

<node name="footprint_pub" pkg="rostopic" type="rostopic" args="pub /move_base/local_costmap/footprint geometry_msgs/Polygon -l -- '{points: [{x: 0.2, y: 0.15, z: 0.0}, {x: -0.2, y: 0.15, z: 0.0}, {x: -0.2, y: -0.15, z: 0.0}, {x: 0.2, y: -0.15, z: 0.0}]}'"/>

<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"> <remap from="odom" to="/odom"/> <remap from="cmd_vel" to="/cmd_vel"/>

<rosparam file="$(find scrubber_gazebo)/launch/local_costmap_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find scrubber_gazebo)/launch/global_costmap_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find scrubber_gazebo)/launch/planner_params.yaml" command="load" />

</node>

Local Costmap

global_frame: map

robot_base_frame: vehicle_base_link

update_frequency: 10.0

publish_frequency: 10.0

transform_tolerance: 1.0 # allowable time delay (in seconds) of transform data

static_map: false # map changes dynamically

rolling_window: true # map region moves with robot

width: 4.0

height: 4.0

resolution: 0.025

origin_x: -2.0 # center map on robot base using "robot_base_frame" as reference, note that local costmap is aligned with global frame, robot MUST be centered in local cost map

origin_y: -2.0

plugins: # - {name: voxel_layer, type: "costmap_2d::VoxelLayer"}

- {name: obstacle_layer,      type: "costmap_2d::ObstacleLayer"}

- {name: inflation_layer,     type: "costmap_2d::InflationLayer"}

obstacle_layer:

observation_sources: fake_laser_scan

fake_laser_scan: {

sensor_frame: body_link, # DOES NOT WORK if same as robot_base_frame

data_type: LaserScan,

topic: /scan_local,

expected_update_rate: 10,

marking: true,

clearing: true,

inf_is_valid: true

} inflation_layer:

inflation_radius: 0.4

Global Costmap

global_frame: map

robot_base_frame: vehicle_base_link

update_frequency: 1

publish_frequency: 1

transform_tolerance: 1.0 # allowable time delay (in seconds) of transform data

plugins: - {name: static_layer, type: "rtabmap_ros::StaticLayer"}

# - {name: static_layer,       type: "costmap_2d::StaticLayer"}

- {name: inflation_layer,       type: "costmap_2d::InflationLayer"}

static_layer: observation_sources: proj_map

proj_map: {expected_update_rate: 3, data_type: Map, sensor_frame: /map, topic: /map}

inflation_layer:

inflation_radius: 0.4

Planner ROS

base_global_planner: global_planner/GlobalPlanner

base_local_planner: base_local_planner/TrajectoryPlannerROS

planner_patience: 30.0 # time in seconds to wait for valid plan before attempting recovery behaviours controller_patience: 60.0 # time ... (more)

edit retag flag offensive close merge delete

Comments

Can you post the visualization the local costmap via rviz? Just a quick observation: your local costmap width and height is 4 and origin x and y offset is -2. Not sure if this would cause anything. Normally I just use origin offset 0 so that robot is at center of the costmap.

DavidN gravatar imageDavidN ( 2016-04-06 21:03:07 -0500 )edit

Unfortunately, I don't know the solution. But you might also try teb_local_planner since you can limit the turning radius (car-like). Maybe this could be helpful for your tricycle model? I recommend ver 0.3 from github (or in a few weeks from the public repo)

croesmann gravatar imagecroesmann ( 2016-04-08 09:06:37 -0500 )edit

Thank you, I went on this page yesterday and that's what I wanted to try today.

TeddyBear gravatar imageTeddyBear ( 2016-04-08 10:32:37 -0500 )edit