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

ax2550 node

asked 2015-02-25 13:35:30 -0500

asusrog gravatar image

updated 2015-02-28 04:21:16 -0500

Hello,

I have been trying to run the ax2550_node from the ros ax2550 package found here https://github.com/wjwwood/ax2550.git .

But i get an error which says

AX2550 connecting to port /dev/motor_controller
[ERROR] [1424892454.858165528]: Failed to connect to the AX2550: IO Exception (2): No such file or directory, file /tmp/buildd/ros-hydro-serial-1.1.7-0raring-20141231-2116/src/impl/unix.cc, line 150.
[ INFO] [1424892454.858316111]: Will try to reconnect to the AX2550 in 5 seconds

I have tried changing the port permissions as suggested by this user ( http://answers.ros.org/question/18655... ) but to no avail. Could anyone please help me resolve this issue.

Update:

I have switched the usb-serial converter. I am now using Aten uc232-a. I am able to communicate with the controller via the roboteq roborun pc utility for windows 8. But somehow this node is unable to connect. I have tried assigning the serial port string("/dev/ttyUSB0") to the serial port parameter of the node using the following line : [rosrun ax2550 ax2550_node _serial_port:="/dev/ttyUSB0"] (&) [rosrun ax2550 ax2550_node serial_port:="/dev/ttyUSB0"] but it too has failed.

I dont know what iam doing wrong. Could anyone please guide me into the right direction. It is absolutely important for me to get this node working.

This is the output from "ls -l /dev/ttyUSB0":

crwxrwxrwx 1 root dialout 188, 0 Feb 28 04:14 /dev/ttyUSB0

And when i run the node with the following command " rosrun ax2550 ax2550_node serial_port:="/dev/ttyUSB0" " i get the same error as specified earlier.

edit retag flag offensive close merge delete

Comments

Please use the preview feature to review your question before posting - I had to reformat your question so that the full error message was visible.

ahendrix gravatar image ahendrix  ( 2015-02-27 03:17:59 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
2

answered 2015-02-27 03:21:30 -0500

ahendrix gravatar image

updated 2015-02-28 20:58:11 -0500

The output from the first error indicates that the device file it's trying to use (/dev/motor_controller) doesn't exist - not really surprising given that your motor controller is on a different port.

Unfortunately, you don't give enough information to answer your question well, such as what the node does when configured properly.

Please edit your question to include:

  • The output from ls -l /dev/ttyUSB0 (to verify that your serial port exists and has proper permissions)
  • The output from running rosrun ax2550 ax2550_node serial_port:="/dev/ttyUSB0"

UPDATE

The ax2550 node uses parameters from the public namespace (NOT the node's private namespace). According to the remapping arguments page, only private parameters can be set from the command line.

You should try setting the serial_port parameter using rosparam before starting the node:

rosparam set serial_port /dev/ttyUSB0
rosrun ax2550 ax2550_node

You should not have to change the node's source code in order to change the parameters.

You can also set the parameter and run the node via a launch file:

<launch>
  <param name="serial_port" value="/dev/ttyUSB0"/>
  <node pkg="ax2550" type="ax2550_node" name="ax2550_node"/>
</launch>
edit flag offensive delete link more
0

answered 2015-02-28 04:58:46 -0500

asusrog gravatar image

I got it working, but this is more of an adhoc solution. Following is the constructor for AX2550 class, the parameter to be passed is the serial port to which the controller is connected.

AX2550::AX2550 (string port): port_(""), serial_port_(NULL), serial_listener_(1), connected_(false), synced_(false){  this->port_ = port;

I believe somehow the parameter wasnt being set and the default parameter shown below was being used,

std::string port;
n.param("serial_port", port, std::string("/dev/motor_controller"));

So i changed it to the following

std::string port;
n.param("serial_port", port, std::string("/dev/ttyUSB0"));

Now it works. But i will have to change the code and re-make the node everytime i change the port. The source code can be found here https://github.com/wjwwood/ax2550.git .

If anybody could tell me what is going wrong with the node, i'd be deeply grateful. Thank you.

edit flag offensive delete link more
-1

answered 2015-09-07 11:02:32 -0500

edit flag offensive delete link more

Comments

Without any explanation, this is not an acceptable answer, and I'm not sure how it applies to the original post in any case.

ahendrix gravatar image ahendrix  ( 2015-09-07 18:38:54 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-02-25 13:35:30 -0500

Seen: 496 times

Last updated: Sep 07 '15