Ask Your Question

Controlling a quadcopter in Gazebo

asked 2019-06-26 23:02:30 -0600

Jarvis1997 gravatar image


I have created the following .xacro model for quadcopter: 2 cris cross arms (box geometry) and 4 propellers (box geometry) with the libLiftDrag plugin of gazebo for these propellers. The propellers are described as "JOINTS" of "CONTINUOUS" type, and thus, i would like to use \cmd_vel to control these 4 joints seperately.

1) Is there any plugin in Gazebo, that i can use to control a "SINGLE" joint, unlike the diff_drive plugin ? If it is not, should i go about creating a custom plugin for it?

2) Even if i am able to create a plugin that will publish \cmd_vel to single joint, can i publish 4 different \cmd_vel simultaneously to each of these four joints?

Please help me sort this issue out. Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-01 05:22:21 -0600

Jarvis1997 gravatar image

I found the solution to this problem.

I used transmission elements for the joints (i.e the BLDC motors are modelled as joints with transmission of type "continuous") and used the VelocityJointInterface as my hardwareInterface, and used velocity_controllers/JointGroupVelocityController in my .yaml file, to command all the motors SIMULTANEOUSLY .

I also used the from Gazebo aerodynamics, that generates thrust when my propellers (modelled as thin plate in my .urdf (or) .xacro file) rotate about the joints.

No need of writing complex plugins!

Hope this helps.

Thank you!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-06-26 23:02:30 -0600

Seen: 340 times

Last updated: Jul 01 '19