From 14b1763a3502d41176d836258e8b08f7e81a92fb Mon Sep 17 00:00:00 2001 From: Florent Lamiraux Date: Fri, 23 Jun 2023 09:37:00 +0200 Subject: [PATCH] Use dynamicgraph::size_type instead of int. --- src/roscontrol-sot-controller.cpp | 4 ++-- tests/sot-test-controller.cpp | 2 +- tests/sot-test-controller.hh | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/roscontrol-sot-controller.cpp b/src/roscontrol-sot-controller.cpp index 561a241..5650bbd 100644 --- a/src/roscontrol-sot-controller.cpp +++ b/src/roscontrol-sot-controller.cpp @@ -61,7 +61,7 @@ using namespace rc_sot_system; namespace sot_controller { typedef std::map::iterator it_map_rt_to_sot; typedef std::map::iterator it_control_mode; - +typedef dynamicgraph::size_type size_type; ControlPDMotorControlData::ControlPDMotorControlData() {} void ControlPDMotorControlData::read_from_xmlrpc_value( @@ -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; } diff --git a/tests/sot-test-controller.cpp b/tests/sot-test-controller.cpp index 54e44bb..19d7886 100644 --- a/tests/sot-test-controller.cpp +++ b/tests/sot-test-controller.cpp @@ -101,7 +101,7 @@ void SoTTestController::getControl( } } -void SoTTestController::setControlSize(const int &size) { +void SoTTestController::setControlSize(const size_type &size) { device_->setControlSize(size); } diff --git a/tests/sot-test-controller.hh b/tests/sot-test-controller.hh index 87efea0..8f11e94 100644 --- a/tests/sot-test-controller.hh +++ b/tests/sot-test-controller.hh @@ -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(); @@ -41,7 +42,7 @@ class SoTTestController : public dgsot::AbstractSotExternalInterface { void getControl(std::map &anglesOut, const double &period); - void setControlSize(const int &size); + void setControlSize(const size_type &size); void initialize(); void setNoIntegration(void); void setSecondOrderIntegration(void);