Commit 81654dec authored by Olivier Stasse's avatar Olivier Stasse
Browse files

Fix detection of sensor extension.

parent e4cbbcef
...@@ -214,7 +214,7 @@ namespace sot_controller ...@@ -214,7 +214,7 @@ namespace sot_controller
// Temperature sensor not available in simulation mode // Temperature sensor not available in simulation mode
if (!simulation_mode_) if (!simulation_mode_)
{ {
#ifdef TEMPERATURE_SENSOR_CONTROLLER_FOUND #ifdef TEMPERATURE_SENSOR_CONTROLLER
// Get a pointer to the actuator temperature sensor interface // Get a pointer to the actuator temperature sensor interface
act_temp_iface_ = robot_hw->get<ActuatorTemperatureSensorInterface>(); act_temp_iface_ = robot_hw->get<ActuatorTemperatureSensorInterface>();
if (!act_temp_iface_) if (!act_temp_iface_)
...@@ -686,7 +686,7 @@ namespace sot_controller ...@@ -686,7 +686,7 @@ namespace sot_controller
{ {
if (!simulation_mode_) if (!simulation_mode_)
{ {
#ifdef TEMPERATURE_SENSOR_CONTROLLER_FOUND #ifdef TEMPERATURE_SENSOR_CONTROLLER
// get temperature sensors names // get temperature sensors names
const std::vector<std::string>& act_temp_iface_names = act_temp_iface_->getNames(); const std::vector<std::string>& act_temp_iface_names = act_temp_iface_->getNames();
...@@ -732,12 +732,12 @@ namespace sot_controller ...@@ -732,12 +732,12 @@ namespace sot_controller
{ {
DataOneIter_.motor_angle[idJoint] = joints_[idJoint].getPosition(); DataOneIter_.motor_angle[idJoint] = joints_[idJoint].getPosition();
#ifdef TEMPERATURE_SENSOR_CONTROLLER_FOUND #ifdef TEMPERATURE_SENSOR_CONTROLLER
DataOneIter_.joint_angle[idJoint] = joints_[idJoint].getAbsolutePosition(); DataOneIter_.joint_angle[idJoint] = joints_[idJoint].getAbsolutePosition();
#endif #endif
DataOneIter_.velocities[idJoint] = joints_[idJoint].getVelocity(); DataOneIter_.velocities[idJoint] = joints_[idJoint].getVelocity();
#ifdef TEMPERATURE_SENSOR_CONTROLLER_FOUND #ifdef TEMPERATURE_SENSOR_CONTROLLER
DataOneIter_.torques[idJoint] = joints_[idJoint].getTorqueSensor(); DataOneIter_.torques[idJoint] = joints_[idJoint].getTorqueSensor();
#endif #endif
DataOneIter_.motor_currents[idJoint] = joints_[idJoint].getEffort(); DataOneIter_.motor_currents[idJoint] = joints_[idJoint].getEffort();
...@@ -834,7 +834,7 @@ namespace sot_controller ...@@ -834,7 +834,7 @@ namespace sot_controller
{ {
if (!simulation_mode_) if (!simulation_mode_)
{ {
#ifdef TEMPERATURE_SENSOR_CONTROLLER_FOUND #ifdef TEMPERATURE_SENSOR_CONTROLLER
for(unsigned int idFS=0;idFS<act_temp_sensors_.size();idFS++) for(unsigned int idFS=0;idFS<act_temp_sensors_.size();idFS++)
{ {
DataOneIter_.temperatures[idFS]= act_temp_sensors_[idFS].getValue(); DataOneIter_.temperatures[idFS]= act_temp_sensors_[idFS].getValue();
......
...@@ -115,7 +115,7 @@ namespace sot_controller ...@@ -115,7 +115,7 @@ namespace sot_controller
/// \brief Vector of 6D force sensor. /// \brief Vector of 6D force sensor.
std::vector<lhi::ForceTorqueSensorHandle> ft_sensors_; std::vector<lhi::ForceTorqueSensorHandle> ft_sensors_;
#ifdef TEMPERATURE_SENSOR_CONTROLLER_FOUND #ifdef TEMPERATURE_SENSOR_CONTROLLER
/// \brief Vector of temperature sensors for the actuators. /// \brief Vector of temperature sensors for the actuators.
std::vector<lhi::ActuatorTemperatureSensorHandle> std::vector<lhi::ActuatorTemperatureSensorHandle>
act_temp_sensors_; act_temp_sensors_;
...@@ -133,7 +133,7 @@ namespace sot_controller ...@@ -133,7 +133,7 @@ namespace sot_controller
/// \brief Interface to the sensors (Force). /// \brief Interface to the sensors (Force).
lhi::ForceTorqueSensorInterface* ft_iface_; lhi::ForceTorqueSensorInterface* ft_iface_;
#ifdef TEMPERATURE_SENSOR_CONTROLLER_FOUND #ifdef TEMPERATURE_SENSOR_CONTROLLER
/// \brief Interface to the actuator temperature sensor. /// \brief Interface to the actuator temperature sensor.
lhi::ActuatorTemperatureSensorInterface * act_temp_iface_; lhi::ActuatorTemperatureSensorInterface * act_temp_iface_;
#endif #endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment