Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Controlling a robotic arm in Gazebo using purely Torques/Forces

Hi,

I currently have the UR3 robotic arm loaded in Gazebo using their provided URDF/Xacro. I would like to make the arm move by specifying how much torque a particular joint of the arm produces.

My initial intuition would be to create a Gazebo plugin. I have been looking at the Gazebo Physics Joint class, but I have to admit I am a bit lost as to what function to use. I have a basic plugin that can print out the links and joints of the arm, but I am having little luck moving the arm.

The reason I am not using the built-in JointController class is because eventually I want to test out my own controllers for the arm; however, the default JointController already includes a PID controller implementation built-in and only takes in the goal joint position. I would like a lower-level method to make a joint provide some torque and let Gazebo simulate what applying this torque would do.

Controlling a robotic arm in Gazebo using purely Torques/Forces

Hi,

I currently have the UR3 robotic arm loaded in Gazebo using their provided URDF/Xacro. I would like to make the arm move by specifying how much torque a particular joint of the arm produces.

My initial intuition would be to create a Gazebo plugin. I have been looking at the Gazebo Physics Joint class, but I have to admit I am a bit lost as to what function to use. I have a basic plugin that can print out the links and joints of the arm, but I am having little luck moving the arm.arm. Currently my update function of my plugin looks like this:

public: void OnUpdate(const common::UpdateInfo & /*_info*/)
    {
         this->model->GetJoint("shoulder_lift_joint")->SetForce(1, 10000);
    }

It seems to jiggle the arm slightly but doesn't have any other effect. I am also confused about the inputs of set force. What indices correspond to which axis, and what are the units of force?

The reason I am not using the built-in JointController class is because eventually I want to test out my own controllers for the arm; however, the default JointController already includes a PID controller implementation built-in and only takes in the goal joint position. I would like a lower-level method to make a joint provide some torque and let Gazebo simulate what applying this torque would do.

Controlling a robotic arm in Gazebo using purely Torques/Forces

Hi,

I currently have the UR3 robotic arm loaded in Gazebo using their provided URDF/Xacro. I would like to make the arm move by specifying how much torque a particular joint of the arm produces.

My initial intuition would be to create a Gazebo plugin. I have been looking at the Gazebo Physics Joint class, but I have to admit I am a bit lost as to what function to use. I have a basic plugin that can print out the links and joints of the arm, but I am having little luck moving the arm. Currently my update function of my plugin looks like this:

public: void OnUpdate(const common::UpdateInfo & /*_info*/)
    {
         this->model->GetJoint("shoulder_lift_joint")->SetForce(1, 10000);
    }

It seems to jiggle the arm slightly but doesn't have any other effect. I am also confused about the inputs of set force. What indices correspond to which axis, and what are the units of force?

The reason I am not using the built-in JointController class is because eventually I want to test out my own controllers for the arm; however, the default JointController already includes a PID controller implementation built-in and only takes in the goal joint position. I would like a lower-level method to make a joint provide some torque and let Gazebo simulate what applying this torque would do.


Edit:

After submitting the question, I changed the axis to 2 and the force to 1000000 ie. SetForce(2,1000000), which was enough to break the model. So it seems the function does affect the model, but I would still like some clarification about the input parameters and whether this is the correct approach.

Controlling a robotic arm in Gazebo using purely Torques/Forces

Hi,

I currently have the UR3 robotic arm loaded in Gazebo using their provided URDF/Xacro. I would like to make the arm move by specifying how much torque a particular joint of the arm produces.

My initial intuition would be to create a Gazebo plugin. I have been looking at the Gazebo Physics Joint class, but I have to admit I am a bit lost as to what function to use. I have a basic plugin that can print out the links and joints of the arm, but I am having little luck moving the arm. Currently my update function of my plugin looks like this:

public: void OnUpdate(const common::UpdateInfo & /*_info*/)
    {
         this->model->GetJoint("shoulder_lift_joint")->SetForce(1, 10000);
    }

It seems to jiggle the arm slightly but doesn't have any other effect. I am also confused about the inputs of set force. What indices correspond to which axis, and what are the units of force?

The reason I am not using the built-in JointController class is because eventually I want to test out my own controllers for the arm; however, the default JointController already includes a PID controller implementation built-in and only takes in the goal joint position. I would like a lower-level method to make a joint provide some torque and let Gazebo simulate what applying this torque would do.


Edit:

After submitting the question, I changed the axis to 2 and the force to 1000000 ie. (SetForce(2,1000000), ), which was enough to break the model. So it seems the function does affect the model, but I would still like some clarification about the input parameters and whether this is the correct approach.