Skip to content
Snippets Groups Projects
Commit 2ac3c66d authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Chnaged the name of the protocol version parameter.

parent eda94d8f
No related branches found
No related tags found
No related merge requests found
#ifndef DYNAMIXEL_ROBOT_GAZEBO_IMP_H
#define DYNAMIXEL_ROBOT_GAZEBO_IMP_H
#include <sys/stat.h>
#include "exceptions.h"
#include "dynamixel_robot_gazebo.h"
#include "dynamixel_slave_serial.h"
#include "dynamixel_servo.h"
namespace dynamixel_robot_gazebo
{
......@@ -95,10 +94,14 @@ namespace dynamixel_robot_gazebo
inline void DynamixelRobotGazebo::starting(const ros::Time& time)
{
if(this->dyn_slave!=NULL)
this->dyn_slave->start();
}
inline void DynamixelRobotGazebo::stopping(const ros::Time& time)
{
if(this->dyn_slave!=NULL)
this->dyn_slave->stop();
}
DynamixelRobotGazebo::DynamixelRobotGazebo()
......@@ -160,7 +163,7 @@ namespace dynamixel_robot_gazebo
}
try{
dynamixel_nh.getParam("protocol", protocol);
dynamixel_nh.getParam("protocol_version", protocol);
if(protocol==1)
this->dyn_slave=new CDynamixelSlaveSerial(root_nh.getNamespace()+"_slave",device_name,dyn_version1);
else if(protocol==2)
......@@ -233,5 +236,3 @@ namespace dynamixel_robot_gazebo
} // namespace
PLUGINLIB_EXPORT_CLASS(dynamixel_robot_gazebo::DynamixelRobotGazebo, controller_interface::ControllerBase)
#endif // header guard
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment