Robotics StackExchange | Archived questions

tricycle model navigation stack issue

Hello,

I have created a tricycle model (2 wheels+ 1 front steering wheel) driven with the "Tricycle" Ros plugins (gazeborostricycledrive.cpp). The model seems to work and I have been able to control it with RQT with odom and cmdvel 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 :

<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" />

Local Costmap

global_frame: map

robotbaseframe: vehiclebaselink

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

originx: -2.0 # center map on robot base using "robotbase_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: voxellayer, type: "costmap2d::VoxelLayer"}

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

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

obstacle_layer:

observationsources: fakelaser_scan

fakelaserscan: {

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

robotbaseframe: vehiclebaselink

update_frequency: 1

publish_frequency: 1

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

plugins: - {name: staticlayer, type: "rtabmapros::StaticLayer"}

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

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

staticlayer: observationsources: proj_map

projmap: {expectedupdaterate: 3, datatype: Map, sensor_frame: /map, topic: /map}

inflation_layer:

inflation_radius: 0.4

Planner ROS

baseglobalplanner: global_planner/GlobalPlanner

baselocalplanner: baselocalplanner/TrajectoryPlannerROS

plannerpatience: 30.0 # time in seconds to wait for valid plan before attempting recovery behaviours controllerpatience: 60.0 # time in second to wait for valid control input before recovery behaviours controllerfrequency: 10.0 recoverybehavior_enabled: false

TrajectoryPlannerROS:

acclimx: 0.6

acclimy: 0.0

acclimtheta: 1.6

maxvelx: 0.20

minvelx: 0.01

maxveltheta: 0.20

minveltheta: -0.20

# maxrotationalvel: 0.20

mininplaceveltheta: 0.01

# escape_vel: -0.10

holonomic_robot: false

meter_scoring: true

xygoaltolerance: 0.20

yawgoaltolerance: 0.20

latchxygoal_tolerance: false

sim_time: 5

sim_granularity: 0.01

angularsimgranularity: 0.01

vx_samples: 15

vtheta_samples: 15

gdist_scale: 0.9

pdist_scale: 0.1

occdist_scale: 0.01

heading_lookahead: 0.325

dwa: true

oscillationresetdist: 0.05

meter_scoring: true

Thank you :)

Asked by TeddyBear on 2016-04-06 11:26:23 UTC

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.

Asked by DavidN on 2016-04-06 21:03:07 UTC

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)

Asked by croesmann on 2016-04-08 09:06:37 UTC

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

Asked by TeddyBear on 2016-04-08 10:32:37 UTC

Answers