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

Rosaria connection through USB adapter

asked 2012-01-18 22:32:53 -0600

LucaGhera gravatar image

Hi all,

I'm trying to define an Orocos component for controlling the movement of a Pioneer3dx.

For doing that I installed the Orocos and ROSARIA stacks.

Now the problem is that I cannot connect to my robot. It is connected to the pc through and USB adapter and the aria library looks by default for the serial port.

I tried to use these coomands:

ArSerialConnection serialCon;
serialCon.setPort("/dev/ttyUSB0");
robot.setDeviceConnection(&serialCon);

However the application still locks for the serial port and not for the usb. How can I fix it?

Thanks!!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-01-19 00:14:53 -0600

JKS gravatar image

Hi! I'm not very familiar with Orocos, but are you sure that you are using ROSARIA to connect to the robot? USB to serial is the default in ROSARIA (/dev/ttyUSB0) and you can change it using port parameter, e.g. rosrun ROSARIA RosAria _port:=/dev/ttyUSB1 in case you have something else on /dev/ttyUSB0.

If you are using Aria library directly (from Aria metapackage), take a look at RosAriaNode::Setup() method:

ArArgumentBuilder *args;
args = new ArArgumentBuilder();
args->add("-rp"); //pass robot's serial port to Aria
args->add(serial_port.c_str());
// left out irrelevant code
conn = new ArSimpleConnector(args);
// left out irrelevant code
// Connect to the robot
if (!conn->connectRobot(robot)) {
  ArLog::log(ArLog::Terse, "rotate: Could not connect to robot! Exiting.");
  return 1;
}
edit flag offensive delete link more

Comments

@JKS Thank! Yes, actually I think I'm using Aria and not ROSARIA. Is there a tutorial for ROSARIA? Btw, I tried to apply you code and it works!!! Thanks!!
LucaGhera gravatar image LucaGhera  ( 2012-01-19 02:50:26 -0600 )edit

Can you setup ROSARIA to use a TCP instead of a serial connection? If so how? In the source code I noticed that the arguments -rh (remotehost) and -rrtp (remote port) are passed. But if Iuse RosAria -rh IP -rrtp PORT it still tries the serial connection.

Eisenhorn gravatar image Eisenhorn  ( 2012-10-19 02:09:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-01-18 22:32:53 -0600

Seen: 623 times

Last updated: Jan 19 '12