Skip to content

Commit

Permalink
Use dynamicgraph::size_type instead of int.
Browse files Browse the repository at this point in the history
  • Loading branch information
florent-lamiraux committed Jul 28, 2023
1 parent a39d1a9 commit 14b1763
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/roscontrol-sot-controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ using namespace rc_sot_system;
namespace sot_controller {
typedef std::map<std::string, std::string>::iterator it_map_rt_to_sot;
typedef std::map<std::string, std::string>::iterator it_control_mode;

typedef dynamicgraph::size_type size_type;
ControlPDMotorControlData::ControlPDMotorControlData() {}

void ControlPDMotorControlData::read_from_xmlrpc_value(
Expand Down Expand Up @@ -171,7 +171,7 @@ bool RCSotController::initRequest(lhi::RobotHW *robot_hw,
ROS_WARN("initRequest 4");
/// Create SoT
SotLoaderBasic::Initialization();
sotController_->setControlSize((int)joints_name_.size());
sotController_->setControlSize((size_type)joints_name_.size());
ROS_WARN("initRequest 5");
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/sot-test-controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void SoTTestController::getControl(
}
}

void SoTTestController::setControlSize(const int &size) {
void SoTTestController::setControlSize(const size_type &size) {
device_->setControlSize(size);
}

Expand Down
3 changes: 2 additions & 1 deletion tests/sot-test-controller.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace dgsot = dynamicgraph::sot;

class SoTTestController : public dgsot::AbstractSotExternalInterface {
public:
typedef dynamicgraph::size_type size_type;
static const std::string LOG_PYTHON;

SoTTestController();
Expand All @@ -41,7 +42,7 @@ class SoTTestController : public dgsot::AbstractSotExternalInterface {
void getControl(std::map<std::string, dgsot::ControlValues> &anglesOut,
const double &period);

void setControlSize(const int &size);
void setControlSize(const size_type &size);
void initialize();
void setNoIntegration(void);
void setSecondOrderIntegration(void);
Expand Down

0 comments on commit 14b1763

Please sign in to comment.