# Revision history [back]

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.