Ask Your Question
1

Prolbems with stage pioneer and laser/rangers on fuerte

asked 2012-05-23 04:24:41 -0600

Markus Bader gravatar image

I have problems to use my stage simulation with the default pioneer robot. I got messages like:

ROS Stage currently supports rangers with 1 sensor only.

or

number of position models and laser models must be equal in the world file.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-05-23 04:46:13 -0600

Markus Bader gravatar image

The current stageros implementation supports only one ranger/laser sensor per robot.

You have to use a stage model without sonar to use the laser sensor.

Attached you will find my cave-pionee.world which includes a working pioneer stage simulation. The background file cave.png must be in the same folder to get it working

# cave-pionee.world 
# simple cave environment with a pioneer robot based on the basic world file examples of 
# Richard Vaughan Richard Vaughan, Andrew Howard, Luis Riazuelo
# Authors: Markus Bader


define hokuyolaser ranger
(
  sensor(       
    # laser-specific properties
    # factory settings for LMS200  
    range [ 0.0  5.0 ]
    fov 270.0
    samples 270
  )
  model
  (
    # generic model properties
    size [ 0.07 0.07 0.05 ] # dimensions from LMS200 data sheet  
    color "blue"
  )
)

define my_block model
(
  size [0.5 0.5 0.5]
  gui_nose 0
)


define floorplan model
(
  # sombre, sensible, artistic
  color "gray30"

  # most maps will need a bounding box
  boundary 1

  gui_nose 0
  gui_grid 0

  gui_outline 0
  gripper_return 0
  fiducial_return 0
  laser_return 1
)

# set the resolution of the underlying raytrace model in meters
resolution 0.02

interval_sim 100  # simulation timestep in milliseconds


# configure the GUI window
window
(
  size [ 635.000 666.000 ] # in pixels
  scale 36.995   # pixels per meter
  center [ -0.040  -0.274 ]
  rotate [ 0  0 ]

  show_data 1              # 1=on 0=off
)

# load an environment bitmap
floorplan
( 
  name "cave"
  size [16.000 16.000 0.800]
  pose [0 0 0 0]
  bitmap "cave.png"
)
# set the resolution of


# throw in a robot
my_block( pose [ 5 4 0 180.000 ] color "green")


define pioneer_base position 
(
  color "red"      # Default color.
  drive "diff"       # Differential steering model.
  gui_nose 1                    # Draw a nose on the robot so we can see which way it points
  obstacle_return 1             # Can hit things.
  ranger_return 0.5              # reflects sonar beams
  blob_return 1                 # Seen by blobfinders  
  fiducial_return 1             # Seen as "1" fiducial finders

  localization "gps"             
  localization_origin [0 0 0 0]   # Start odometry at (0, 0, 0).

  # alternative odometric localization with simple error model
  # localization "odom"             # Change to "gps" to have impossibly perfect, global odometry
  #  odom_error [ 0.05 0.05 0.1 ]     # Odometry error or slip in X, Y and Theta
                                     # (Uniform random distribution)   

  # four DOF kinematics limits
  # [ xmin xmax ymin ymax zmin zmax amin amax ]        
  velocity_bounds [-0.5 0.5 0 0 0 0 -90.0 90.0 ]          
  acceleration_bounds [-0.5 0.5 0 0 0 0 -90 90.0 ]
)



define pioneer2dx_base_no_sonar pioneer_base
(
  # actual size
  size [0.44 0.38 0.22] # sizes from MobileRobots' web site

  # the pioneer's center of rotation is offset from its center of area
  origin [-0.04 0 0 0]

  # draw a nose on the robot so we can see which way it points
  gui_nose 1

  # estimated mass in KG
  mass 23.0 
  # differential steering model
  drive "diff"
 )

# as above, but with front sonar only
define pioneer2dx_no_sonar pioneer2dx_base_no_sonar
(  
  # simplified Body shape:
  block( 
    points 8
    point[0] [-0.2 0.12]
    point[1] [-0.2 -0.12]
    point[2] [-0.12 -0.2555]
    point[3] [0.12 -0.2555]
    point[4] [0.2 -0.12 ...
(more)
edit flag offensive delete link more

Comments

Which current stageros are you describing? Electric has stage 3.2.1, with one laser. Fuerte has stage 4.1.1, which replaces the laser interface with ranger.

joq gravatar image joq  ( 2012-05-23 05:41:33 -0600 )edit

ros fuerte uses stage 4.1.1 as default

Markus Bader gravatar image Markus Bader  ( 2012-05-28 22:45:09 -0600 )edit

@Markus Bader Thanks, great help - chances are that I will 'steal' your code into my git repository ! Also this works just fine in Hydro !

Arkapravo gravatar image Arkapravo  ( 2014-07-06 12:33:02 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-05-23 04:24:41 -0600

Seen: 2,019 times

Last updated: May 23 '12