@@ -823,7 +823,7 @@ bool DynamixelHardware::InitDxlReadItems()
823
823
hdl_gpio_sensor_states_.clear ();
824
824
hdl_gpio_controller_states_.clear ();
825
825
for (const hardware_interface::ComponentInfo & gpio : info_.gpios ) {
826
- if (gpio.state_interfaces . size () && gpio. parameters .at (" type" ) == " dxl" ) {
826
+ if (gpio.parameters .at (" type" ) == " dxl" ) {
827
827
uint8_t id = static_cast <uint8_t >(stoi (gpio.parameters .at (" ID" )));
828
828
HandlerVarType temp_read;
829
829
temp_read.id = id;
@@ -839,7 +839,7 @@ bool DynamixelHardware::InitDxlReadItems()
839
839
}
840
840
}
841
841
hdl_trans_states_.push_back (temp_read);
842
- } else if (gpio.state_interfaces . size () && gpio. parameters .at (" type" ) == " sensor" ) {
842
+ } else if (gpio.parameters .at (" type" ) == " sensor" ) {
843
843
uint8_t id = static_cast <uint8_t >(stoi (gpio.parameters .at (" ID" )));
844
844
HandlerVarType temp_sensor;
845
845
temp_sensor.id = id;
@@ -863,7 +863,7 @@ bool DynamixelHardware::InitDxlReadItems()
863
863
temp_controller.value_ptr_vec .push_back (std::make_shared<double >(0.0 ));
864
864
}
865
865
hdl_gpio_controller_states_.push_back (temp_controller);
866
- } else if (gpio.state_interfaces . size () && gpio. parameters .at (" type" ) == " virtual_dxl" ) {
866
+ } else if (gpio.parameters .at (" type" ) == " virtual_dxl" ) {
867
867
uint8_t id = static_cast <uint8_t >(stoi (gpio.parameters .at (" ID" )));
868
868
uint8_t comm_id = static_cast <uint8_t >(stoi (gpio.parameters .at (" comm_id" )));
869
869
HandlerVarType temp_read;
@@ -923,7 +923,7 @@ bool DynamixelHardware::InitDxlWriteItems()
923
923
hdl_trans_commands_.clear ();
924
924
hdl_gpio_controller_commands_.clear ();
925
925
for (const hardware_interface::ComponentInfo & gpio : info_.gpios ) {
926
- if (gpio.command_interfaces . size () && gpio. parameters .at (" type" ) == " dxl" ) {
926
+ if (gpio.parameters .at (" type" ) == " dxl" ) {
927
927
uint8_t id = static_cast <uint8_t >(stoi (gpio.parameters .at (" ID" )));
928
928
HandlerVarType temp_write;
929
929
temp_write.id = id;
@@ -941,7 +941,7 @@ bool DynamixelHardware::InitDxlWriteItems()
941
941
temp_write.value_ptr_vec .push_back (std::make_shared<double >(0.0 ));
942
942
}
943
943
hdl_trans_commands_.push_back (temp_write);
944
- } else if (gpio.command_interfaces . size () && gpio. parameters .at (" type" ) == " controller" ) {
944
+ } else if (gpio.parameters .at (" type" ) == " controller" ) {
945
945
uint8_t id = static_cast <uint8_t >(stoi (gpio.parameters .at (" ID" )));
946
946
HandlerVarType temp_controller;
947
947
temp_controller.id = id;
@@ -953,7 +953,7 @@ bool DynamixelHardware::InitDxlWriteItems()
953
953
temp_controller.value_ptr_vec .push_back (std::make_shared<double >(0.0 ));
954
954
}
955
955
hdl_gpio_controller_commands_.push_back (temp_controller);
956
- } else if (gpio.command_interfaces . size () && gpio. parameters .at (" type" ) == " virtual_dxl" ) {
956
+ } else if (gpio.parameters .at (" type" ) == " virtual_dxl" ) {
957
957
uint8_t id = static_cast <uint8_t >(stoi (gpio.parameters .at (" ID" )));
958
958
uint8_t comm_id = static_cast <uint8_t >(stoi (gpio.parameters .at (" comm_id" )));
959
959
HandlerVarType temp_write;
@@ -1076,7 +1076,7 @@ void DynamixelHardware::MapInterfaces(
1076
1076
size_t outer_size,
1077
1077
size_t inner_size,
1078
1078
std::vector<HandlerVarType> & outer_handlers,
1079
- const std::vector<HandlerVarType> & inner_handlers,
1079
+ std::vector<HandlerVarType> & inner_handlers,
1080
1080
double ** matrix,
1081
1081
const std::unordered_map<std::string, std::vector<std::string>> & iface_map,
1082
1082
const std::string & conversion_iface,
0 commit comments