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

Pioneer Robots

asked 2012-06-06 06:25:56 -0500

allenh1 gravatar image

updated 2012-06-07 04:48:17 -0500

Hello all,

I have a pioneer-3dx robot. It has ROS diamondback installed with Ubuntu 11.04. Would anyone be willing to help me get the p2os_driver to work? It fails to set up the p2os board. The board is the original setup and the serial should be /dev/ttyS0, but it won't setup. What do I need to do to get it working?

Thanks, -Hunter A.

First, I start roscore:

allenh1@muri-pc7:~/ros/unstable/p2os_driver$ roscore

In a new terminal, I then start the node:

allenh1@muri-pc7:~/ros/unstable/p2os_driver$ ./p2os
[ INFO] [1339007302.017190905]: using serial port: [/dev/ttyUSB0]
[ INFO] [1339007302.048548689]: P2OS connection opening serial port /dev/ttyUSB0...
[ERROR] [1339007302.048644466]: P2OS::Setup():open():
[ERROR] [1339007302.048728305]: p2os setup failed...

I want to make sure it's working properly before we get a laptop on it, so here's my current setup.

Here's my setup:


New errors... Progress...

I gave write access to the USB with this command:

allenh1@muri-pc7:~$ sudo chmod 777 /dev/ttyUSB0

New Output:


Firstly, I'm pretty special. I forgot to plug the robot it; however, upon plugging it in, the old errors were reproduced. So, I'd say that's pretty conclusive evidence that the robot is at least attempting to communicate with the computer.

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted
1

answered 2012-06-06 06:53:45 -0500

karthik gravatar image

updated 2012-06-06 23:43:53 -0500

Hi, If you are connecting your laptop to your robot with usb port then. Please go through this answer. You should be able to resolve the issue. Else be specific on the error you are getting.

Thanks


I would suggest you to follow this tutorial carefully. Since you are using only one laptop on the robot, you can ignore the networking part of it. Please post the errors that you are getting along with their corresponding ros commands.


Ok I see your pic here. It looks fine. Just a small guess on the rights of the /dev/ttyUSB0. Make sure you have given both read and write rights to that port before you run the p2os. Follow the instructions and run in the following fashion.

roscore
rosrun p2os_dashboard p2os_dashboard

Please check the dashboard and take a screenshot of the same as well.

rosrun p2os_driver p2os

If you are just planning to check if the robot is fine and working you may go with the ROSARIA package and test it. It might be simpler than p2os. But if you are planning start your work on something then p2os is suggested for pioneer bots. If the above process doesn't work please post the pic of the screenshot taken in the dashboard stage.

Thanks, Karthik

edit flag offensive delete link more

Comments

How are you connecting the base? Do I need a cable? Does the local network communication not suffice?

allenh1 gravatar image allenh1  ( 2012-06-06 07:52:14 -0500 )edit

Place the laptop on the robot and connect the seriel (robot) to usb (laptop) converter.

karthik gravatar image karthik  ( 2012-06-06 08:13:49 -0500 )edit

Do I need to run anything on the robot? It's a fresh install. I've got the serial to usb plugged into the external serial. Is that right?

allenh1 gravatar image allenh1  ( 2012-06-06 08:20:49 -0500 )edit

yes... ....

karthik gravatar image karthik  ( 2012-06-06 08:25:52 -0500 )edit

on the host I run: p2os _port:=/dev/ttyUSB0 and roscore. On the robot, I run nothing.

allenh1 gravatar image allenh1  ( 2012-06-06 08:27:25 -0500 )edit

allen: You have to be clear. I get a feeling that you have a laptop on the robot and a workstation which is connected via wifi to the laptop on the robot. Am i right?

karthik gravatar image karthik  ( 2012-06-06 08:30:24 -0500 )edit

No... I have a physical connection with a serial to usb. Would you mind posting a picture of your setup?

allenh1 gravatar image allenh1  ( 2012-06-06 08:31:22 -0500 )edit

I am not in the lab right now. I would require more info now. So i understand you have connected ur laptop to the robot using the converter. Please give me the details of the commands you gave after this step in the laptop. I mean the ros commands. Please post it by editing your question.

karthik gravatar image karthik  ( 2012-06-06 08:34:29 -0500 )edit
0

answered 2012-06-07 04:55:21 -0500

allenh1 gravatar image

I did it! It works now! The only thing I had to do to fix the issue was to use a recursive permissions change:

Change permissions:

allenh1@muri-pc7:~/Downloads$ sudo chmod 777 -R /dev/ttyUSB0

Run the p2os_driver:

allenh1@muri-pc7:~/Downloads$ rosrun p2os_driver p2os 
[ INFO] [1339080752.700066535]: using serial port: [/dev/ttyUSB0]
[ INFO] [1339080752.716311926]: P2OS connection opening serial port /dev/ttyUSB0...
[ INFO] [1339080753.118958632]: SYNC0
[ INFO] [1339080753.319249408]: turning off NONBLOCK mode...
[ INFO] [1339080753.519563222]: SYNC1
[ INFO] [1339080753.920032541]: SYNC2
[ INFO] [1339080754.520631021]: Done.
   Connected to Julie_2, a Pioneer P3DX
[ INFO] [1339080756.923499420]: resetting raw positions
edit flag offensive delete link more

Comments

1

happy that i was able to point out that... as i generally do the same mistake previously :)

karthik gravatar image karthik  ( 2012-06-07 05:49:15 -0500 )edit
0

answered 2012-06-06 19:05:51 -0500

viking gravatar image

If you familir with aria, you can use ROSARIA to communicate with Pioneer also, which is what I'm doing now.

I'm using P3AT, and connect a laptop through a serial to usb cable. I have written a node to communicate with robot, get and publish odometry & laser information. Now the navigation stack works well on it.

edit flag offensive delete link more

Comments

Do you know how to setup up ROSAIRA to use TCP instead of the serial port? I have an AmigoBot with a serial-to-ethernet bridge.

Eisenhorn gravatar image Eisenhorn  ( 2012-10-19 02:19:00 -0500 )edit
0

answered 2014-08-28 02:19:00 -0500

updated 2014-08-28 02:19:28 -0500

I have the same problem with p2os,

lili@lili:~$ rosrun p2os_driver p2os_driver I did $sudo chmod 777 -R /dev/ttyS0 $sudo chmod 777 -R /dev/ttyUSB0

but it still doesn't work.

Thank you!

edit flag offensive delete link more

Comments

if you are using serial to USB connector, then in the source package you may have to change the port to ttyUSB0

sai gravatar image sai  ( 2014-08-28 02:59:19 -0500 )edit
0

answered 2012-10-10 23:52:18 -0500

Markus Bader gravatar image

Add the user to the group dialout

Don't waist time to set rights on your usb devices.

On Ubuntu 12.04 it is enough to add the user to the group dialout

sudo usermod -a -G dialout $USER

The user have to logout and to login again to update the policy.

Greetings Markus

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2012-06-06 06:25:56 -0500

Seen: 3,184 times

Last updated: Aug 28 '14