There are two checks in the RMP driver to see if an incoming velocity should
be applied. The obvious one is that if you dont send the REQ_MOTOR_POWER
(SetMotorEnable), the RMP wont react to any commands. For the second
check, the RMP driver verifies that incoming velocity commands to have the
state field[1] set to true. It looks like VFH isnt setting the velocity
command state to true, which could be causing your problem. You can insert
cmd.state = true; around line 760 of vfh.cc and recompile to verify.
Rich
[1]
http://playerstage.sourceforge.net/doc/Player-svn/player/structplayer__posit
ion2d__cmd__vel.html
From: Hans-Jürgen Wandschneider [mailto:hjwandschneider@...]
Sent: Monday, September 27, 2010 8:11 AM
To: playerstage-users@...
Subject: [Playerstage-users] vfh position command
I have a little problem with the position command.
I have a Segway RMP ( <http://rmp.segway.com/rmp-50-omni/>
http://rmp.segway.com/rmp-50-omni/) and I try to give it a go to position
command via the vfh driver.
When steering using playerv with the vfhs position2d device using only the
command option everything works just fine, the segway receives its commands
and acts accordingly (setting x velocity and turnrate).
When I use the Position Mode to send it to a certain location, the segway
still says it is getting the commands (setting x velocity and turnrate) but
doesnt move at all.
Any suggestions on where the problem might be?
Thank you for your help
Hans
Dont know if it helps, but here is my .cfg :
driver
(
name "segwayrmp"
provides ["position2d:2" "power:0" ]
bus "usb"
usb_device "/dev/ttyUSB0"
max_xspeed 3.0
max_yawspeed 60
alwayson 1
)
driver
(
name "segwayrmp"
provides ["position2d:1" "power:1" ]
bus "usb"
usb_device "/dev/ttyUSB1"
max_xspeed 3.0
max_yawspeed 60
alwayson 1
)
driver
(
name "segwayrmp400"
provides ["position2d:0" ]
requires ["front2d:::position2d:1" "back2d:::position2d:2"]
fullspeed_data 1
)
driver
(
name "hokuyo_aist"
provides [ "ranger:0" ]
portopts "type=serial,device=/dev/ttyACM0,timeout=1,baud=115200"
pose [ 0.36 0.0 0.10 3.14 0.0 0.0]
baud_rate 115200
min_angle -1.57079
max_angle 1.57079
alwayson 1
)
driver
(
name "mapfile"
provides ["6665:map:0"]
filename "umgebung.png"
resolution 0.02 # meters per pixel
)
driver
(
name "rangertolaser"
requires ["ranger:0"] # read from ranger:0
provides ["laser:0"] # output results on laser:0
)
driver
(
name "amcl"
provides ["localize:0" "position2d:4"]
requires ["odometry:::position2d:0" "laser:0" "laser:::map:0"]
)
driver
(
name "vfh"
provides ["position2d:3"]
requires ["position2d:0" "laser:0"]
distance_epsilon 0.1
angle_epsilon 5
)
driver
(
name "wavefront"
provides ["6665:planner:0"]
requires ["output:::position2d:3" "input:::position2d:4" "map:0"]
distance_epsilon 0.1
angle_epsilon 5
alwayson 1
)
|