Robotics StackExchange | Archived questions

Error in connecting to SegwayRMP

The goal of my small project is to control SegwayRMP 210 with a joystick using ROS (Ubuntu 12.04 with ROS Hydro). I installed the segway RMP package using the following command

sudo apt-get install ros-hydro-segway-rmp

Which i beleive is the same package as available on https://github.com/segwayrmp/segway-rmp-ros-pkg

I am able to correctly install and run the package but the ROS node does not connect to Segway RMP robot using serial.

Command line execution of ROS node:

rosrun segway_rmp segway_rmp_node _interface_type:="serial" _serial_port="/dev/ttyACM0"

Output:

[ INFO] [1403651441.961049099]: Accel limits: linear: pos = 0.000000, neg = 0.000000, angular: pos = 0.000000, neg = 0.000000.
[ INFO] [1403651441.966015479]: Velocity limits: linear: 0.000000, angular: 0.000000.
[ INFO] [1403651441.975693745]: Connecting to Segway RMP via serial on serial port: /dev/ttyACM0
[ERROR] [1403651441.987917081]: Exception while connecting to the SegwayRMP, check your cables and power buttons.
[ERROR] [1403651441.988096560]:     ConnectionFailedException occurred at line 36 of `/tmp/buildd/ros-hydro-libsegwayrmp-0.2.10-0precise-20140617-0350/src/impl/rmp_serial.cc`: Error connecting to the SegwayRMP: IO Exception (13): Permission denied, file /tmp/buildd/ros-hydro-serial-1.1.7-0precise-20140617-0113/src/impl/unix.cc, line 150.
[ WARN] [1403651441.988215851]: Not connected to the SegwayRMP, will retry in 5 seconds...
[ERROR] [1403651446.988773196]: Exception while connecting to the SegwayRMP, check your cables and power buttons.
[ERROR] [1403651446.988898198]:     
[ WARN] [1403651446.988958962]: Not connected to the SegwayRMP, will retry in 5 seconds...
[ERROR] [1403651451.989506473]: Exception while connecting to the SegwayRMP, check your cables and power buttons.
[ERROR] [1403651451.989643138]:     ConnectionFailedException occurred at line 36 of `/tmp/buildd/ros-hydro-libsegwayrmp-0.2.10-0precise-20140617-0350/src/impl/rmp_serial.cc`: Error connecting to the SegwayRMP: IO Exception (13): Permission denied, file /tmp/buildd/ros-hydro-serial-1.1.7-0precise-20140617-0113/src/impl/unix.cc, line 150.

All I can grab from the above log is that there is certainly some comms issue. Questions:

  1. Is libsegwayrmp compatible with Segway RMP 210?
  2. Does a serial port change from ttyUSB to ttyACM make a significant difference to execution?

Looking forward to a reply. Thanks in advance.

Asked by ajain on 2014-06-24 18:32:20 UTC

Comments

Answers

Seeing as the RMP 210 does have a spec sheet yet, I would guess it is pretty new and therefore uses the new comm protocol like the rmp440, which is known not to work. I don't know that for sure, but since I cannot check the spec sheet I cannot know.

That being said, the exception you are actually getting is "Permission denied", which means you may not have permission to open the serial port. Make sure you are part of the correct group on Linux, usually dialout or uucp, and reboot the computer, then try it.

Asked by William on 2014-06-24 18:54:30 UTC

Comments

Thanks for a quick reply. Setting myself a part of dialout group makes it work fine. Now I get the following output:

[ INFO] [1403655725.984780098]: Accel limits: linear: pos = 0.000000, neg = 0.000000, angular: pos = 0.000000, neg = 0.000000. [ INFO] [1403655725.989906440]: Velocity limits: linear: 0.000000, angular: 0.000000. [ INFO] [1403655726.006345509]: Connecting to Segway RMP via serial on serial port: /dev/ttyACM0 [ INFO] [1403655726.023023196]: Segway RMP Ready. [ERROR] [1403655727.023388855]: No data from Segway...

I believe that rosnode is not able to receive and parse data from Segway because of new API. Let me know if I'm correct or this can be fixed.

Asked by ajain on 2014-06-24 19:26:42 UTC

As I feared, I think that the segway protocol is different. See: http://answers.ros.org/question/58038/ros-wrapper-for-segway-rmp440-omni/

Asked by William on 2014-06-24 19:51:32 UTC