23 #ifndef EV3_JOINT_SETTINGS_INTERFACE_H
24 #define EV3_JOINT_SETTINGS_INTERFACE_H
28 #include <ros/duration.h>
30 #include <boost/shared_ptr.hpp>
32 #include <hardware_interface/controller_info.h>
33 #include <hardware_interface/joint_command_interface.h>
34 #include <hardware_interface/internal/resource_manager.h>
37 #include "../../../h4r_ev3_manager/include/h4r_ev3_joint_setup/ev3_joint_settings.h"
38 #include "../../../h4r_ev3_manager/include/h4r_ev3_joint_setup/ev3_joint_settings_exception.h"
39 #include "../../../h4r_ev3_manager/include/h4r_ev3_joint_setup/ev3_joint_settings_params.h"
45 using namespace hardware_interface;
59 const JointHandle& jh,
65 std::string getName()
const
91 return this->ResourceManager<Ev3JointInterfaceHandle>::getHandle(name);
93 catch(
const std::logic_error& e)
99 bool ControllerTestChange(
const std::list<ControllerInfo> &start_list)
const
105 bool ControllerChange(
const std::list<ControllerInfo> &start_list)
107 ROS_INFO(
"Controller Change");
108 for (std::list<ControllerInfo>::const_iterator it = start_list.begin(); it != start_list.end(); it++)
110 for (std::set<std::string>::const_iterator res = it->resources.begin(); res != it->resources.end(); res++)
112 ROS_INFO_STREAM(it->type<<
" requests Joint "<<it->name<<
" "<<*res);
119 handle.getSettings().port.
setMotorCommand(Ev3Strings::EV3MOTORCOMMANDS_RESET);
120 getJointSettings(*res, ev3settings);
121 ROS_INFO(
"----------------------------------------------<");
122 handle.getSettings().load(ev3settings,
true);
126 ROS_ERROR_STREAM(
"Did not find handle: "<<*res);
Definition: ev3_joint_settings.h:29
Definition: ev3_joint_settings_interface.h:83
Definition: ev3_joint_settings_interface.h:49
Definition: ev3_joint_settings.h:41
bool setMotorCommand(Ev3Strings::Ev3MotorCommands command)
Definition: H4REv3Port.h:339
Definition: ev3_joint_settings_exception.h:33