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

Fix detection of sensor extension.

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