Robotics StackExchange | Archived questions

How to simulate motors in Gazebo without ROS

Hi!

I am looking forward to simulate a motor using Gazebo (and I am quite new to it). For now, I only have a revolute joint between two links. But I really need to add some motor characteristics such as

For the reduction part I was thinking of using a gearbox joint but when I try to use it, my robot collapses. So I am not sure to really understand how it works.

I saw that it exists using ROS and URDF but I am using only Gazebo and SDF format. Can you help me please ? :)

Asked by laura on 2020-07-01 09:07:42 UTC

Comments

Answers

You can create a model plugin, get access to the joint, and then you can control it by setting its position, velocity, or effort. Within this plugin, you can freely implement your motor interface as you like.

You can use default_robot_hw_sim as a reference. This is where the "ROS motors" are implemented.

Asked by nlamprian on 2020-07-01 09:34:39 UTC

Comments

thanks for your answer! I am already using a model plugin to do a torque compensation on every updates (because the rotation of one joint leads to the rotation of another one, and i don't want it to move). If i set torque or velocity in my plugin, the joint can't stop rotating. One solution could be to send torque and velocity command when I am sending position command from another library. To take into account reduction due to training, do you know how gearbox joint works or examples pls?

Asked by laura on 2020-07-01 10:44:01 UTC

You can find a working gearbox joint here. It's loaded in the variable_gearbox_plugin.world if you wanna try it.

Asked by nlamprian on 2020-07-01 15:32:35 UTC