Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Model errror after spawning

Hi,

I created a model of a Fork-Lifter. The Chassis and the forks are separated links, connected with a prismatic joint. This joint is controlled by a plug-in that handles the fork height.

When I'm spawning the model, sometimes I have the issue that the fork is spawned a few meters away from the chassis. When I'm excluding the fork lift plug-in it seems stable.

Another issue is that sometimes when I'm spawning the model, it seems that it gets a force kick and than it flies away. I already adjusted the inertia, but it doesn't helped. The reproductivity of both errors are quite strange, sometimes it works, sometimes the forks are displaced and sometime the whole model flies away.

Can someone have a look on my model.sdf and the lift/fork control plug-in? I'm really running out of ideas where the error could be.

kempten.world

model.sdf

lift_ctrl.hpp

lift_ctrl.cpp

Thanks a lot, Rob

Model errror after spawning

Hi,

I created a model of a Fork-Lifter. The Chassis and the forks are separated links, connected with a prismatic joint. This joint is controlled by a plug-in that handles the fork height.

When I'm spawning the model, sometimes I have the issue that the fork is spawned a few meters away from the chassis. When I'm excluding the fork lift plug-in it seems stable.

Another issue is that sometimes when I'm spawning the model, it seems that it gets a force kick and than it flies away. I already adjusted the inertia, but it doesn't helped. The reproductivity of both errors are quite strange, sometimes it works, sometimes the forks are displaced and sometime the whole model flies away.

Can someone have a look on my model.sdf and the lift/fork control plug-in? I'm really running out of ideas where the error could be.

kempten.world

model.sdf

lift_ctrl.hpp

lift_ctrl.cpp

[UPDATE]:

The solution for me was to use SetForce() instead of using the model SetJointPosition() method. I followed the ElevatorPlugin example and implemented it like that:

this->liftPID.Init(1600, 0, 1600);
double error = this->liftJoint->GetAngle(2).Radian() - (setpoint_height);
double force = this->liftPID.Update(error, _info.simTime - this->prevSimTime);
this->prevSimTime = _info.simTime;
this->liftJoint->SetForce(0, force);

Also an approach over the a JointController and setting up a pid over SetPositionPID() was avoiding my problem. Only thing is that you have then to deal with the PID parameters.

Thanks a lot, Rob

Model errror after spawning

Hi,

I created a model of a Fork-Lifter. The Chassis and the forks are separated links, connected with a prismatic joint. This joint is controlled by a plug-in that handles the fork height.

When I'm spawning the model, sometimes I have the issue that the fork is spawned a few meters away from the chassis. When I'm excluding the fork lift plug-in it seems stable.

Another issue is that sometimes when I'm spawning the model, it seems that it gets a force kick and than it flies away. I already adjusted the inertia, but it doesn't helped. The reproductivity of both errors are quite strange, sometimes it works, sometimes the forks are displaced and sometime the whole model flies away.

Can someone have a look on my model.sdf and the lift/fork control plug-in? I'm really running out of ideas where the error could be.

kempten.world

model.sdf

lift_ctrl.hpp

lift_ctrl.cpp

[UPDATE]:

The solution for me was to use SetForce() instead of using the model SetJointPosition() method. I followed the ElevatorPlugin example and implemented it like that:

this->liftPID.Init(1600, 0, 1600);
double error = this->liftJoint->GetAngle(2).Radian() - (setpoint_height);
double force = this->liftPID.Update(error, _info.simTime - this->prevSimTime);
this->prevSimTime = _info.simTime;
this->liftJoint->SetForce(0, force);

Also an approach over the a JointController and setting up a pid over SetPositionPID() was avoiding my problem. Only thing is that you have then

But now I see the issue that everything that I want to deal lift with the PID parameters.fork is flying away and my vehicle model is going crazy. Does anyone encountered a similar problem?

Thanks a lot, Rob

Model errror after spawning

Hi,

I created a model of a Fork-Lifter. The Chassis and the forks are separated links, connected with a prismatic joint. This joint is controlled by a plug-in that handles the fork height.

When I'm spawning the model, sometimes I have the issue that the fork is spawned a few meters away from the chassis. When I'm excluding the fork lift plug-in it seems stable.

Another issue is that sometimes when I'm spawning the model, it seems that it gets a force kick and than it flies away. I already adjusted the inertia, but it doesn't helped. The reproductivity of both errors are quite strange, sometimes it works, sometimes the forks are displaced and sometime the whole model flies away.

Can someone have a look on my model.sdf and the lift/fork control plug-in? I'm really running out of ideas where the error could be.

kempten.world

model.sdf

lift_ctrl.hpp

lift_ctrl.cpp

[UPDATE]:

The solution for me was to use SetForce() instead of using the model SetJointPosition() method. I followed the ElevatorPlugin example and implemented it like that:

this->liftPID.Init(1600, 0, 1600);
double error = this->liftJoint->GetAngle(2).Radian() - (setpoint_height);
double force = this->liftPID.Update(error, _info.simTime - this->prevSimTime);
this->prevSimTime = _info.simTime;
this->liftJoint->SetForce(0, force);

Also an approach over the a JointController and setting up a pid over SetPositionPID() was avoiding my problem.

But now I see the issue that everything that I want to lift with the fork is flying away and my vehicle model is going crazy. Does anyone encountered a similar problem?

Thanks a lot, Rob

Model errror after spawning

Hi,

I created a model of a Fork-Lifter. The Chassis and the forks are separated links, connected with a prismatic joint. This joint is controlled by a plug-in that handles the fork height.

When I'm spawning the model, sometimes I have the issue that the fork is spawned a few meters away from the chassis. When I'm excluding the fork lift plug-in it seems stable.

Another issue is that sometimes when I'm spawning the model, it seems that it gets a force kick and than it flies away. I already adjusted the inertia, but it doesn't helped. The reproductivity of both errors are quite strange, sometimes it works, sometimes the forks are displaced and sometime the whole model flies away.

Can someone have a look on my model.sdf and the lift/fork control plug-in? I'm really running out of ideas where the error could be.

kempten.world

model.sdf

lift_ctrl.hpp

lift_ctrl.cpp

[UPDATE]:

model.sdf

lift_ctrl.cpp

The solution for me was to use SetForce() instead of using the model SetJointPosition() method. I followed the ElevatorPlugin example and implemented it like that:

this->liftPID.Init(1600, 0, 1600);
double error = this->liftJoint->GetAngle(2).Radian() - (setpoint_height);
double force = this->liftPID.Update(error, _info.simTime - this->prevSimTime);
this->prevSimTime = _info.simTime;
this->liftJoint->SetForce(0, force);

Also an approach over the a JointController and setting up a pid over SetPositionPID() was avoiding my problem. But now I'm encountering another one, when I'm trying to lift something with the fork, a pallet or a box, its either flying away or the vehicle starts to shake.... I updated already my model added the same parameters like in the elevator example for the lift joint, but no success.

Thanks a lot, Rob

Model errror after spawning

Hi,

I created a model of a Fork-Lifter. The Chassis and the forks are separated links, connected with a prismatic joint. This joint is controlled by a plug-in that handles the fork height.

When I'm spawning the model, sometimes I have the issue that the fork is spawned a few meters away from the chassis. When I'm excluding the fork lift plug-in it seems stable.

Another issue is that sometimes when I'm spawning the model, it seems that it gets a force kick and than it flies away. I already adjusted the inertia, but it doesn't helped. The reproductivity of both errors are quite strange, sometimes it works, sometimes the forks are displaced and sometime the whole model flies away.

Can someone have a look on my model.sdf and the lift/fork control plug-in? I'm really running out of ideas where the error could be.

[UPDATE]:

model.sdf

lift_ctrl.cpp

The solution for me was to use SetForce() instead of using the model SetJointPosition() method. I followed the ElevatorPlugin example and implemented it like that:

this->liftPID.Init(1600, 0, 1600);
double error = this->liftJoint->GetAngle(2).Radian() - (setpoint_height);
double force = this->liftPID.Update(error, _info.simTime - this->prevSimTime);
this->prevSimTime = _info.simTime;
this->liftJoint->SetForce(0, force);

Also an approach over a JointController and setting up a pid over SetPositionPID() was avoiding my problem. But now I'm encountering another one, when I'm trying to lift something with the fork, a pallet or a box, its either flying away or the vehicle starts to shake.... I updated already my model added the same parameters like in the elevator example for the lift joint, but no success.

Thanks a lot, Rob