Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Revolute joint created through plugin not moving

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.

Revolute joint created through plugin not moving

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. 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.