ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

P2os and rosaria not connecting to Pioneer P3-AT

asked 2016-06-08 07:36:19 -0500

shivam-kumar gravatar image

I have pioneer p3-at robot and a separate laptop with Ubuntu 14.04 and Ros Indigo properly installed in it.

I downloaded p2os from https://github.com/allenh1/p2os and rosaria from https://github.com/amor-ros-pkg/rosar...

I am connecting robot to laptop via serial(robot) to usb(laptop) converter with RS-232 cable

But every time I run command

sudo usermod -a -G dialout $USER

Then I logged out and again logged in

sudo chmod 777 -R /dev/ttyUSB0

rosrun rosaria RosAria _port:=/dev/ttyUSB0

But I get this error

shivam@shivam-Inspiron-3542:~$ : rosrun rosaria RosAria

[ INFO] [1422444061.117081691]: RosAria: using port: [/dev/ttyS0]

Could not connect to simulator, connecting to robot through serial port /dev/ttyS0.

Syncing 0

No packet.

Syncing 0

No packet.

Trying to close possible old connection

Syncing 0

No packet.

Syncing 0

No packet.

Robot may be connected but not open, trying to dislodge.

Syncing 0

No packet.

Robot may be connected but not open, trying to dislodge.

Syncing 0

No packet.

Could not connect, no robot responding.

Failed to connect to robot.

[ERROR] [1422444067.613784823]: RosAria: ARIA could not connect to robot! (Check ~port parameter is correct, and permissions on port device.)

[FATAL] [1422444067.613882512]: RosAria: ROS node setup failed...

And when I run p2os it shows this

[ERROR] [1349087058.764888277]: Error reading packet header from robot connection: P2OSPacket():Receive():read():

.

.

[ERROR] [1349087114.446749752]: Error reading packet header from robot connection: P2OSPacket():Receive():read():

[ERROR] [1349087114.447846009]: p2os setup failed...

[p2os-1] process has died [pid 12089, exit code 255]

Robot is working properly. I tried it with Aria Library which comes with p3-at. Actually robot has windows-7 installed in its onboard pc which I think should not be a problem because I am connecting it using the serial port of the robot. And no where it mentions that robot's OS is important

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-06-10 09:25:11 -0500

ReedHedges gravatar image

When you run RosAria or p2os you can specify the port via a port parameter. e.g. rosrun rosaria RosAria _port:=/dev/ttyUSB0 or rosrun p2os p2os_driver _port:=/dev/ttyUSB0. When you tested it with ARIA, did you alse specify the /dev/ttyUSB0 as the port (e.g. demo -rp /dev/ttyUSB0)?

You can turn off the internal onboard computer with the switch on the side. This will give you extra battery life and prevent any possible interference with anything on that computer also using the serial port.

edit flag offensive delete link more

Comments

I am using the port /dev/ttyUSB0, I am supplying it as a parameter in RosAria and p2os both. "Turn Off the on-board computer" - the serial port is on the on-board computer, I think if I turn it off then serial port won't work. Or is there any other serial port inside the robot

shivam-kumar gravatar image shivam-kumar  ( 2016-06-10 10:49:25 -0500 )edit

Yes you should use the HOST/SERIAL port on the left side of the robot if you are using an added laptop, that is the connection to the robot's controller. (Which is also connected to the internal computer as well.)

ReedHedges gravatar image ReedHedges  ( 2016-06-10 11:23:15 -0500 )edit

So you mean I need to open the robot's top plate to access the Host Serial Port because I don't See it in P3-AT on the side

shivam-kumar gravatar image shivam-kumar  ( 2016-06-10 11:25:35 -0500 )edit

Sorry on the P3AT its on the top, next to TX, RX, STATUS leds, reset button, battery led, etc. STATUS should show if the controller is ready, communicating to software etc. TX and RX will show if there is any communication through the serial connection.

ReedHedges gravatar image ReedHedges  ( 2016-06-10 12:33:27 -0500 )edit

Could you please tell me if I need to give any commands on the robot to connect via serial port. I know you said turn off the onboard computer and I did, but it still could not connect. So we don't need to give any permissions, just connect the serial cable to the robot and run the command on laptop

shivam-kumar gravatar image shivam-kumar  ( 2016-06-10 13:10:54 -0500 )edit

Sir I Know its too many questions? but Sir please, its urgent for me, I have to complete my work in 1 month at my college

shivam-kumar gravatar image shivam-kumar  ( 2016-06-10 13:12:15 -0500 )edit
0

answered 2016-06-10 14:33:40 -0500

Sam94 gravatar image

updated 2016-06-10 14:34:20 -0500

In the example you posted, it shows that you used /dev/ttyS0 instead of /dev/ttyUSB0 in your attempt to connect, so make sure that you use the correct syntax. I use an AmigoBot, not a P3-AT, but it sounds like the connection process is similar when using the serial port. I usually use the following process to connect with RosAria.

-Turn on the robot and laptop and connect them with the RS-232 cable

-Run 'roscore' on laptop terminal (1)

-Run 'sudo chmod 666 /dev/ttyUSB0' on a new laptop terminal (2)

-Run 'rosrun rosaria RosAria _port:=/dev/ttyUSB0' on laptop terminal (2)

Additionally, if you are using an RS-232 extension cable, you should verify that it is the correct type. The AmigoBot uses a straight through, not a null modem. Null modem cables have a different wiring configuration; I'm not sure which the P3AT uses, but you should double check. Additionally, some cables don't have all of the pins connected, so that could also be causing problems.

edit flag offensive delete link more

Comments

I used the port parameter to specify the port as /dev/ttyUSB0 , Is there any possibility that even after specifying the port it used the port /dev/ttyS0 ?

shivam-kumar gravatar image shivam-kumar  ( 2016-06-11 22:25:57 -0500 )edit

You included the command that gave the error message.

shivam@shivam-Inspiron-3542:~$ : rosrun rosaria RosAria

I don't know if this was just one of several attempts, or if you didn't include the port parameter on any of your attempts. I don't think it would have used an unspecified port.

Sam94 gravatar image Sam94  ( 2016-06-12 13:08:11 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-06-08 07:36:19 -0500

Seen: 723 times

Last updated: Jun 10 '16