Buscar este blog

Mostrando entradas con la etiqueta p2os installation. Mostrar todas las entradas
Mostrando entradas con la etiqueta p2os installation. Mostrar todas las entradas

miércoles, 9 de marzo de 2011

Verifying network connection with Player/Stage

1. This is the cfg file that includes the p2os driver:


driver
(
name "p2os"
provides ["position2d:0" "power:0" "sonar:0"]
port "/dev/ttyUSB0"
safe 1
)

2. I first connected Pio to lola and verified the functionality of both the cfg file and the playerjoy interface. Everyting worked fine.

$ robot-player pio.cfg
$ robot-playerjoy

3. I then ran the playerjoy interface on XPS including lola's IP and the port to which player listens (6665). And once again, everything worked just fine.

(on XPS) $ robot-playerjoy 10.48.56.34:6665

4. I then inverted roles and ran the cfg file on XPS. I verified playerjoy's functionality both in XPS and lola and the following error message was being displayed:

create and bind socket():bind() failed; socket not created.: Adress already in use player.

5. By reading forums I figures out that perhaps the problem had to do with the firewall so I enabled in ins XPS and enables access of both hosts to port 6665.

On XPS (10.48.61.241) which had the problem:

$sudo ufw enable
$sudo ufw alow proto tcp from 10.48.61.241 port 6665.
That solved the problem
 
6. Now I have to figure out if ROS' issues have to do with the firewall as well, but I am not sure
in which default port does it listens. It is perhaps 11311 

miércoles, 18 de agosto de 2010

Installing p2os

Most of the useful instructions I followed come from the p2os' tutorial: http://www.ros.org/wiki/p2os/Tutorials/Getting%20Started%20with%20p2os

1. I first went to the stacks ros' directory and checked out the svn for the usc packages:
$ cd ~/ros/stacks/
$ svn co https://usc-ros-pkg.svn.sourceforge.net/svnroot/usc-ros-pkg/trunk/ usc-ros-pkg
2. Then I updated the stack list and compiled it
$ rospack profile && rosstack profile
$ rosmake p2os --rosdep-install

3. In order to connect to the /dev/ttyUSB0 port instead of /dev/ttyS0 port (which is default)
I changed the p2os.cc code as follows:

$ roscd p2os
$ cd p2os_driver
$ cd src
$ gedit p2os.cc

And around line 64 I changed the parameter of the port:

n_private.param( "port",psos_serial_port, std::string("/dev/ttyUSB0"));

instead of

n_private.param( "port",psos_serial_port, def );


4. I then just ran the p2os node and it made the connection successfully.

Now, since I currently have no access to the joystick (but I will have it, however), I am going
to modify the teleoperation launch file to do it directly with my keyboard.