You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have ROS Noetic installed on my laptop and I have already used Towr in an exam project, in particular I have successfully implemented a Quadruped (DogBot by ReactRobotics) and it was fine. Now, I'm trying to work on AnymalC robot, but when I run my program I am experiencing a strange error, this error says that Ipopt is not able to find a solution because of CPU time exceeded (most of times).
I have tried many workarounds, but no success. For example, I increased CPU time, but no success. The same code for instance has been used with DogBot and it works fine in few steps.
I have properly configured also anymal_model.h header file, changing the mass and the inertia values, and of course the nominal position of the feet, but no success.
About the input values, they are just normal as well as the final ones, I really don't understand why changing the Quadruped (with the proper changes of course) I'm experiencing this problem.
Here is my code, I am sure that the structure of the code is not a problem, since it has been already used and all the quantities suit the formulation, for example the nominal position of feet is correctly taken from the kinematic model provided to Towr, the Center of Mass position and orientation is something like: 0.0, 0.0, 0.47, 0.0, 0.0, 0.0. Initial velocity is all zeros. Moreover, I tried to modify the inputs, for example by assigning a zero initial velocity rather than something like 0.009e-10 which is given by the functions I have used from iDynTree library, but no success, it seems that the problem is not represented by the input data (both initial and final position/orientation). So, I guess the error is somewhere in anymal_model.h, because there is something that make the optimization problem solved by iPopt fail unconditionally, but since anymal_model.h is a tiny piece of code, I don't know where the issue could be...thanks in advance for any suggestion or any idea about what to be checked you can give me since I am stucked on this problem and I can't figure it out
@brief The Kinematics of the quadruped robot ANYmal.
*/
class AnymalKinematicModel : public KinematicModel {
public:
AnymalKinematicModel () : KinematicModel(4)
{
I managed to solve this problem, even if I don't know why the previous code was wrong, anyway it works now. The problem is represented by this piece of code:
Eigen::Vector3d pos_ee;
for (int ee=0; ee<4; ee++){
switch(ee){
case 0: pos_ee=dogbot->getBLpos();
break;
case 1: pos_ee=dogbot->getBRpos();
break;
case 2: pos_ee=dogbot->getFLpos();
break;
case 3: pos_ee=dogbot->getFRpos();
break;
}
_formulation.initial_ee_W_.at(ee)[0]=pos_ee[0];
_formulation.initial_ee_W_.at(ee)[1]=pos_ee[1];
}
Once removed it, it works. This code just assigns the x and y component of the position to _formulation.initial (which is filled with the nominal positions passed by the kinematic model in anymal_model.h), these positions are something like 0.2831 rather than 0.28, but Ipopt gets mad with these precise values, so I removed this assignment, but remember that this piece of code works fine with Dogbot, hope this issue is useful for someone.
Hi
I have ROS Noetic installed on my laptop and I have already used Towr in an exam project, in particular I have successfully implemented a Quadruped (DogBot by ReactRobotics) and it was fine. Now, I'm trying to work on AnymalC robot, but when I run my program I am experiencing a strange error, this error says that Ipopt is not able to find a solution because of CPU time exceeded (most of times).
I have tried many workarounds, but no success. For example, I increased CPU time, but no success. The same code for instance has been used with DogBot and it works fine in few steps.
I have properly configured also anymal_model.h header file, changing the mass and the inertia values, and of course the nominal position of the feet, but no success.
About the input values, they are just normal as well as the final ones, I really don't understand why changing the Quadruped (with the proper changes of course) I'm experiencing this problem.
Here is my code, I am sure that the structure of the code is not a problem, since it has been already used and all the quantities suit the formulation, for example the nominal position of feet is correctly taken from the kinematic model provided to Towr, the Center of Mass position and orientation is something like: 0.0, 0.0, 0.47, 0.0, 0.0, 0.0. Initial velocity is all zeros. Moreover, I tried to modify the inputs, for example by assigning a zero initial velocity rather than something like 0.009e-10 which is given by the functions I have used from iDynTree library, but no success, it seems that the problem is not represented by the input data (both initial and final position/orientation). So, I guess the error is somewhere in anymal_model.h, because there is something that make the optimization problem solved by iPopt fail unconditionally, but since anymal_model.h is a tiny piece of code, I don't know where the issue could be...thanks in advance for any suggestion or any idea about what to be checked you can give me since I am stucked on this problem and I can't figure it out
void PLANNING::compute_planning(int flag){
}
******************************************************************************/
#ifndef TOWR_TOWR_ROS_INCLUDE_TOWR_ROS_ANYMAL_MODEL_H_
#define TOWR_TOWR_ROS_INCLUDE_TOWR_ROS_ANYMAL_MODEL_H_
#include <towr/models/kinematic_model.h>
#include <towr/models/single_rigid_body_dynamics.h>
#include <towr/models/endeffector_mappings.h>
namespace towr {
/**
@brief The Kinematics of the quadruped robot ANYmal.
*/
class AnymalKinematicModel : public KinematicModel {
public:
AnymalKinematicModel () : KinematicModel(4)
{
const double x_nominal_b = 0.42;
const double y_nominal_b = 0.28;
const double z_nominal_b = -0.07;
nominal_stance_.at(LF) << x_nominal_b, y_nominal_b, z_nominal_b;
nominal_stance_.at(RF) << x_nominal_b, -y_nominal_b, z_nominal_b;
nominal_stance_.at(LH) << -x_nominal_b, y_nominal_b, z_nominal_b;
nominal_stance_.at(RH) << -x_nominal_b, -y_nominal_b, z_nominal_b;
max_dev_from_nominal_ << 0.15, 0.15, 0.15;
}
};
/**
*/
class AnymalDynamicModel : public SingleRigidBodyDynamics {
public:
AnymalDynamicModel()
: SingleRigidBodyDynamics(52.1348,
0.216712, 1.78516, 1.8337, 0.000922381, 0.0589332, -0.000163778,
4) {}
};
} // namespace towr
#endif /* TOWR_TOWR_ROS_INCLUDE_TOWR_ROS_ANYMAL_MODEL_H_ */
The text was updated successfully, but these errors were encountered: