2) Then I Tested the communication with the robot using RosAria.
First I Changed the usb port from port 1 to port 0. To do this you need to go to the ROASRIA package.
$ roscd ROSARIA
$ cd src
Then edit the RosAria.cpp file.
$ sudo gedit RosAria.cpp
and edit the line 80:
n.param( "port", serial_port, std::string("/dev/ttyUSB1") );
to
n.param( "port", serial_port, std::string("/dev/ttyUSB0") );
Make the package and then move to ROSARIA/bin
Then run a Core
$ roscore
Turn on the Pioneer, connect the usb-serial cable and run RosAria
./RosAria.
Finally you should see something like this:
Retrieving information about robot's odometry.
You can also consult my other post to see the next steps about how to control the robot with the keyboard:
Controling Pioneer
2.1) Using the Keyboard to contorl de Pioneer.
Following the instructions of my other post I culnd't teleoperate the robot. I think is is because the latest relese of the svn of teleop_base publishes on a topic named /cmd_vel instead of /RosAria/cmd_vel. So now i'm modifying the RosAria.cpp file so it listens /RosAria/cmd_vel topic.
Note: It is localized in ROSARIA/src and the code i'm modifying is in the line 95 from this:
cmdvel_sub = n.subscribe( "/cmd_vel", 1, (boost::function < void(const geometry_msgs::TwistConstPtr&)>)
To this:
cmdvel_sub = n.subscribe( "/RosAria/cmd_vel", 1, (boost::function < void(const geometry_msgs::TwistConstPtr&)>)
Well Now the robot moves, but there's a little problem with RosAria, because it suddenly stops and the communication with the robot freezes. It stop updating the info...
[ INFO] [1282152720.503071698]: /odom: 1282152720.503030 0.000000 0.000000
It stops there. I will search for the problem later, now I will focus on the next task.
3)
No hay comentarios:
Publicar un comentario