Ask Your Question
1

p2os TCP instead of serialport/usb [closed]

asked 2012-09-29 08:09:36 -0500

Eisenhorn gravatar image

updated 2014-04-20 14:09:31 -0500

ngrennan gravatar image

Hello,

I would like to use the p2os stack to interface an Amigobot, which is an Adept MobileRobots (ActivMedia) robot. This robot uses ARIA as firmware, and so do Pioneer 2/Pioneer 3 (DX and AT). According to http://www.ros.org/wiki/p2os/Tutorials/Getting%20Started%20with%20p2os a computer fixed to the robot is required. I was wondering if the p2os_driver also supports to connect via TCP to the robot instead of using a serial/usb interface.

In robot_params.h I could see these defines

/* conection stuff */ 
#define DEFAULT_P2OS_PORT "/dev/ttyS0" 
#define DEFAULT_P2OS_TCP_REMOTE_HOST "localhost" 
#define DEFAULT_P2OS_TCP_REMOTE_PORT 8101

I guess the DEFAULT_P2OS_TCP_REMOTE_HOST refers to the port where to publish messages? Is it possible to set the DEFAULT_P2OS_PORT to an ethernet interface?

I would like to run both nodes, p2os_driver and telop_keyboard on a laptop an have p2os_driver sending the commands to the ARIA firmware via wlan. Is this possible?

Thanks for any hints,

BR

EDIT:

Do you mean setting tcp_remote_host and use_tcp with rosparam set ? If so this didn't work for me. p2os still tries to establish a connection using the serial port.

rosparam set use_tcp true rosparam set tcp_remote_host 192.168.1.15 rosparam set tcp_remote_port 8101

I have also tried to use ROSARIA, the ARIA Port to ROS. In RosAria.cpp I found this in the Setup routine

    int RosAriaNode::Setup()
{
  ArArgumentBuilder *args;
  args = new ArArgumentBuilder();

  size_t colon_pos = serial_port.find(":");
  if (colon_pos != std::string::npos)
  {
    args->add("-rh"); //pass robot's hostname/IP address to Aria
    args->add(serial_port.substr(0, colon_pos).c_str());
    args->add("-rrtp"); //pass robot's TCP port to Aria
    args->add(serial_port.substr(colon_pos+1).c_str());
  }
  else
  {
    args->add("-rp"); //pass robot's serial port to Aria
    args->add(serial_port.c_str());
  }

I tried to run RosAria using this command:

rosrun ROSARIA RosAria -rh '192.168.1.15' -rrtp '8101'
NonCritical Error: ARIA could not find where it is located.
[ INFO] [1350643787.727256660]: using port: [/dev/ttyUSB0]
ArLog::init:  File(aria.log)     Verbose     Logging Time    Not also printing
setup failed...

Still Rosaria seems to ignore any arguments passed to it.

Do you have any clues?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Eisenhorn
close date 2019-12-20 03:04:46.596012

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-10-04 00:57:56 -0500

ReedHedges gravatar image

Hi,

I haven't actually tried this yet with an Amigobot, but it looks like with the p2os driver you can set use_tcp to true, and change tcp_remote_host to the IP address of the Amigobot (see http://robots.mobilerobots.com/wiki/Wireless_ethernet-serial_bridge_device).

Reed

Adept MobileRobots

edit flag offensive delete link more

Comments

Thanks a lot for your advice! Do you mean setting tcp_remote_host and use_tcp with rosparam set ? If so this didn't work for me. p2os still tries to establish a connection using the serial port. I have also tried to use ROSARIA:rosrun ROSARIA RosAria -rh '192.168.1.15' -rrtp '8101' without succe

Eisenhorn gravatar image Eisenhorn  ( 2012-10-19 01:50:21 -0500 )edit

I'll have to try that with p2os at some point. With RosAria, you would set the port parameter to 192.168.1.15:8101, e.g.: rosrun ROSARIA RosAria _port:=10.0.126.32:8101

ReedHedges gravatar image ReedHedges  ( 2012-10-23 14:03:33 -0500 )edit

Thanks that worked for RosAria. I found this also here http://www.ros.org/wiki/ROSARIA/Tutorials/How%20to%20use%20ROSARIA .

Eisenhorn gravatar image Eisenhorn  ( 2012-10-26 22:09:17 -0500 )edit

Question Tools

Stats

Asked: 2012-09-29 08:09:36 -0500

Seen: 660 times

Last updated: Oct 19 '12