Toby, thanks for pointing that out - I should have looked more closely at the Segway portion of the file. The simulation worked fine. 

Now I'm actually trying to connect to the hardware, and am facing a different set of problems. I got the USB of the Segway recognized, but when I connect to it (I'm using /dev/ttyUSB0, or should be) I get: 

segwayrmp.cfg:14 warning: field [port] is defined but not used
listening on 6665
Listening on ports: 6665 

When I try to run simple.c, I then get: 

accepted TCP client 0 on port 6665, fd 6
CAN bus initializing
Segmentation fault

I'm not sure why the port isn't being "used" - I know that I never saw this with my Create. I also ran lsusb and dmesg to make sure that FTDI was being recognized and it was; it was certainly connected to ttyUSB0.  

I am also really not sure where the segfault is happening. 

My segway.cfg file looks like this:

driver
(
  name "segwayrmp"
  provides ["position2d:0"] --> I started simple
  canio "rmpusb"
  max_xspeed 4.5
  max_yawspeed 6.0
  port ["/dev/ttyUSB0"]


Any ideas to debug these issues would be extremely helpful. Thanks so much. 


Sumita



On Sat, Jul 4, 2009 at 1:37 AM, Toby Collett <tcollett+player@plan9.net.nz> wrote:
The segway config file is designed for connecting to the real robot rather than a simulated one. Have a look at the examples in the stage source under worlds for how to launch the simulation so you can connect to the simulated robot.

2009/7/4 Sumita Sami <sumita.sami@gmail.com>
I have finally got the Segway USB driver compiled and installed with Player 2.1.2. I am now trying to run a simulation on Stage through Player, using the segwayrmp.cfg file and simple.c from examples/libplayerc.

This is my configure file, called usbtest.cfg:

# Desc: Player sample configuration file for controlling Stage devices
# Author:  Richard Vaughan
# Date: 1 December 2004
# CVS: $Id: usbtest.cfg,v 1.34 2007-11-02 01:11:39 gerkey Exp $


# load the Stage plugin simulation driver
driver
(       
  name "stage"
  provides ["simulation:0" ]
  plugin "libstageplugin"

  # load the named file into the simulator
  worldfile "simple.world"    (i was using this for simplicity´s sake)
)

# Export the map
driver
(       
  name "stage"
  provides ["map:0" ]
  model "cave"
)


driver
(
  name "segwayrmp"
  provides ["position2d:0" "position3d:0" "power:0"]
  canio "kvaser"
  max_xspeed 4.5
  max_yawspeed 80
)

# Demonstrates use of a Player "abstract driver": one that doesn't
# interface directly with hardware, but only with other Player devices.
# The VFH driver attempts to drive to commanded positions without
# bumping into obstacles.
driver
(
  name "vfh"
  provides ["position2d:1"]
  requires ["position2d:0" "laser:0" ]
)


But when I run ./simple no position data is returned. Using playerv I got the following error:

PlayerViewer 2.1.2
Connecting to [localhost:6665]
Available devices: localhost:6665
simulation:0     stage                                   unsupported
map:0            stage                                   ready
position2d:0     segwayrmp                               ready
position3d:0     segwayrmp                               unsupported
power:0          segwayrmp                               ready
position2d:1     vfh                                     ready
playerc error   : timed out waiting for server reply to request position2d:0:request:1
playerv : error in pv_dev_position2d.c
  libplayerc error: timed out waiting for server reply to request position2d:0:request:1
playerc error   : requested [2] access, but got [3] access

Running the .cfg file produces:

accepted TCP client 0 on port 6665, fd 10
error   : error on CAN Init
warning : subscription failed for device position2d:0

Adding an alwayson 1 in the Segway portion of the .cfg file poduces an error, Adding it in vfh makes no difference. There is a similar thread here: http://www.nabble.com/help-with-vfh-driver-td14716531.html but the problem is a bit different from the one I´m experiencing.

Any help would be greatly appreciated.


Thanks!
Sumita

--
Sumita Sami
Editor-in-Chief, Nazar - A South Asian Perspective
Electrical and Computer Engineering/Plan II
University of Texas at Austin

------------------------------------------------------------------------------

_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users




--
This email is intended for the addressee only and may contain privileged and/or confidential information

------------------------------------------------------------------------------

_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users




--
Sumita Sami
Editor-in-Chief, Nazar - A South Asian Perspective
www.nazaronline.net
Electrical and Computer Engineering/Plan II
University of Texas at Austin