Revolute joint created through plugin not moving

asked 2019-06-03 04:05:51 -0600

dhindhimathai gravatar image

updated 2019-06-03 04:20:38 -0600

Hi all,

I'm working with Gazebo 9.0.0 on ROS Melodic within Ubuntu 18.04.

I experience the following problem: when I try to create a new revolute joint on my robot through a gazebo plugin, the joint is successfully created between the two specified links but it seems to be a fixed joint! I does not move in simulation.

An outline of what I do to make the joint in the Load function of my Gazebo ModelPlugin is as follows:

// Get the links
this->link_1= model->GetLink("link_1");
this->link_2 = model->GetLink("link_2");

// Adding joint and properties
this->new_joint_ = model->CreateJoint("new_joint", "revolute", this->link_2, this->link_1);
this->new_joint_->Load(this->link_2, this->link_1, this->transform);
this->new_joint_->Attach(this->link_2, this->link_1);
this->new_joint_->SetModel(model);
this->new_axis = ignition::math::Vector3d(1.0, 0.0, 0.0);
this->new_joint_->SetAxis(0, this->new_axis);
this->new_joint_->SetLowerLimit(0, -0.57);
this->new_joint_->SetUpperLimit(0, +0.57);
this->new_joint_->SetEffortLimit(0, 1.0);
this->new_joint_->SetVelocityLimit(0, 1.0);
this->new_joint_->SetDamping(0, 0.001);
this->new_joint_->SetParam("friction", 0, 0.001);

The joint does not rotate around the axis in simulation.

Is there something I am missing? Any help or hint would be greatly appreciated.

Edit:

Two important details are that I'm currently not doing anything in the Update function of the ModelPlugin and the newly created joint is a passive joint.

edit retag flag offensive close merge delete

Comments

can you inspect it after creation in the model editor and look what type of the joint is it? Plus what parameters it has?

kumpakri gravatar imagekumpakri ( 2019-06-11 04:21:01 -0600 )edit