0
$\begingroup$

Rosanswers logo

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!!


Originally posted by LucaGhera on ROS Answers with karma: 128 on 2012-01-18

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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;
}

Originally posted by JKS with karma: 306 on 2012-01-19

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by LucaGhera on 2012-01-19:
@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!!

Comment by Eisenhorn on 2012-10-19:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.