Commit 3eebce33 authored by Olivier Stasse's avatar Olivier Stasse
Browse files

Fix warnings

parent 6c0da11e
......@@ -90,8 +90,8 @@ namespace dynamicgraph {
DECLARE_SIGNAL_IN(accelerometer, dynamicgraph::Vector);
DECLARE_SIGNAL_IN(gyroscope, dynamicgraph::Vector);
DECLARE_SIGNAL_IN(jointTorques, dynamicgraph::Vector);
DECLARE_SIGNAL_OUT(jointTorquesEstimated, dynamicgraph::Vector);
DECLARE_SIGNAL_INNER(collectSensorData, dummy);
DECLARE_SIGNAL_OUT(jointTorquesEstimated, dynamicgraph::Vector);
protected:
RobotUtil * m_robot_util;
......@@ -101,7 +101,7 @@ namespace dynamicgraph {
double epsilon;
double gyro_epsilon;
int ffIndex, torsoIndex; //Index of the free-flyer and torso frames
pinocchio::JointIndex ffIndex, torsoIndex; //Index of the free-flyer and torso frames
Eigen::VectorXd jointTorqueOffsets;
pinocchio::SE3 m_torso_X_imu; // Definition of the imu in the chest frame.
......
......@@ -70,14 +70,15 @@ namespace dynamicgraph
,CONSTRUCT_SIGNAL_IN(jointsVelocities, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(jointsAccelerations, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(jointsTorques, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(jointsTorquesDerivative, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(jointsTorquesDesired, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(jointsTorquesDerivative, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(dq_des, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(KpTorque, dynamicgraph::Vector) // proportional gain for torque feedback controller
,CONSTRUCT_SIGNAL_IN(KiTorque, dynamicgraph::Vector) // integral gain for torque feedback controller
,CONSTRUCT_SIGNAL_IN(KdTorque, dynamicgraph::Vector) // derivative gain for torque feedback controller
,CONSTRUCT_SIGNAL_IN(KdVel, dynamicgraph::Vector) // derivative gain for velocity feedback
,CONSTRUCT_SIGNAL_IN(KiVel, dynamicgraph::Vector) // integral gain for velocity feedback
,CONSTRUCT_SIGNAL_IN(torque_integral_saturation, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(coulomb_friction_compensation_percentage, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(motorParameterKt_p, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(motorParameterKt_n, dynamicgraph::Vector)
......@@ -88,16 +89,15 @@ namespace dynamicgraph
,CONSTRUCT_SIGNAL_IN(motorParameterKa_p, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(motorParameterKa_n, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(polySignDq , dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_IN(torque_integral_saturation, dynamicgraph::Vector)
,CONSTRUCT_SIGNAL_OUT(u, dynamicgraph::Vector, ESTIMATOR_INPUT_SIGNALS <<
TORQUE_CONTROL_INPUT_SIGNALS <<
VEL_CONTROL_INPUT_SIGNALS <<
MODEL_INPUT_SIGNALS <<
m_torque_error_integralSOUT)
,CONSTRUCT_SIGNAL_OUT(smoothSignDq, dynamicgraph::Vector, m_jointsVelocitiesSIN )
,CONSTRUCT_SIGNAL_OUT(torque_error_integral, dynamicgraph::Vector, m_jointsTorquesSIN <<
m_jointsTorquesDesiredSIN <<
TORQUE_INTEGRAL_INPUT_SIGNALS )
,CONSTRUCT_SIGNAL_OUT(smoothSignDq, dynamicgraph::Vector, m_jointsVelocitiesSIN )
{
Entity::signalRegistration( ALL_INPUT_SIGNALS << ALL_OUTPUT_SIGNALS);
......@@ -164,13 +164,13 @@ namespace dynamicgraph
DEFINE_SIGNAL_OUT_FUNCTION(u, dynamicgraph::Vector)
{
const Eigen::VectorXd& q = m_jointsPositionsSIN(iter);
// const Eigen::VectorXd& q = m_jointsPositionsSIN(iter);
const Eigen::VectorXd& dq = m_jointsVelocitiesSIN(iter);
const Eigen::VectorXd& ddq = m_jointsAccelerationsSIN(iter);
const Eigen::VectorXd& tau = m_jointsTorquesSIN(iter);
const Eigen::VectorXd& dtau = m_jointsTorquesDerivativeSIN(iter);
const Eigen::VectorXd& tau_d = m_jointsTorquesDesiredSIN(iter);
// const Eigen::VectorXd& dtau_d = m_jointsTorquesDesiredDerivativeSIN(iter);
// const Eigen::VectorXd& dtau_d = m_jointsTorquesDesiredDerivativeSIN(iter);
const Eigen::VectorXd& dq_des = m_dq_desSIN(iter);
const Eigen::VectorXd& kp = m_KpTorqueSIN(iter);
const Eigen::VectorXd& kd = m_KdTorqueSIN(iter);
......@@ -187,7 +187,7 @@ namespace dynamicgraph
const Eigen::VectorXd& motorParameterKa_p = m_motorParameterKa_pSIN(iter);
const Eigen::VectorXd& motorParameterKa_n = m_motorParameterKa_nSIN(iter);
const Eigen::VectorXd& polySignDq = m_polySignDqSIN(iter);
// const Eigen::VectorXd& dq_thr = m_dq_thresholdSIN(iter);
// const Eigen::VectorXd& dq_thr = m_dq_thresholdSIN(iter);
m_tau_star = tau_d + kp.cwiseProduct(tau_d - tau) + tauErrInt - kd.cwiseProduct(dtau);
......@@ -228,7 +228,7 @@ namespace dynamicgraph
motorParameterKv_n(i),
motorParameterKa_p(i),
motorParameterKa_n(i),
polySignDq(i));
static_cast<unsigned int>(polySignDq(i)));
}
s = m_current_des;
......
......@@ -339,7 +339,7 @@ namespace dynamicgraph
{
if(!m_initSucceeded)
{
SEND_WARNING_STREAM_MSG("Cannot compute signal positionDes before initialization!");
SEND_WARNING_STREAM_MSG("Cannot compute signal positionDes before initialization!" + toString(iter));
return s;
}
......@@ -798,7 +798,7 @@ namespace dynamicgraph
SEND_MSG("Possible joint names are: "+ss.str(), MSG_TYPE_INFO);
return false;
}
id = jid;
id = static_cast<unsigned int>(jid);
return true;
}
......
......@@ -68,8 +68,8 @@ namespace dynamicgraph
,CONSTRUCT_SIGNAL_OUT(pwmDes, dynamicgraph::Vector, INPUT_SIGNALS)
,CONSTRUCT_SIGNAL_OUT(qError, dynamicgraph::Vector, m_base6d_encodersSIN <<
m_qRefSIN)
,m_robot_util(RefVoidRobotUtil())
,m_initSucceeded(false)
,m_robot_util(RefVoidRobotUtil())
{
Entity::signalRegistration( INPUT_SIGNALS << OUTPUT_SIGNALS );
......@@ -160,9 +160,9 @@ namespace dynamicgraph
m_pwmDes = Kp.cwiseProduct(qRef-q.tail(m_robot_util->m_nbJoints)) + Kd.cwiseProduct(dqRef-dq);
if(s.size()!=m_robot_util->m_nbJoints)
s.resize(m_robot_util->m_nbJoints);
s = m_pwmDes;
if(s.size()!=static_cast<Eigen::Index>(m_robot_util->m_nbJoints))
s.resize(m_robot_util->m_nbJoints);
s = m_pwmDes;
}
getProfiler().stop(PROFILE_PWM_DES_COMPUTATION);
......@@ -179,10 +179,10 @@ namespace dynamicgraph
const VectorN6& q = m_base6d_encodersSIN(iter); //n+6
const VectorN& qRef = m_qRefSIN(iter); // n
assert(q.size()==m_robot_util->m_nbJoints+6 && "Unexpected size of signal base6d_encoder");
assert(qRef.size()==m_robot_util->m_nbJoints && "Unexpected size of signal qRef");
assert(q.size()==static_cast<Eigen::Index>(m_robot_util->m_nbJoints+6) && "Unexpected size of signal base6d_encoder");
assert(qRef.size()==static_cast<Eigen::Index>(m_robot_util->m_nbJoints) && "Unexpected size of signal qRef");
if(s.size()!=m_robot_util->m_nbJoints)
if(s.size()!=static_cast<Eigen::Index>(m_robot_util->m_nbJoints))
s.resize(m_robot_util->m_nbJoints);
s = qRef - q.tail(m_robot_util->m_nbJoints);
......
......@@ -80,6 +80,7 @@ namespace dynamicgraph
DEFINE_SIGNAL_OUT_FUNCTION(trigger, int)
{
std::string astr = toString(iter);
playNext();
return s;
}
......
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