p2os TCP instead of serialport/usb [closed]
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?