Robotics StackExchange | Archived questions

Hexapod simulation not working

Hello,

I want to create a simulation for a simple hexapod. When I spawn the model in Gazebo, I get a behavior like the following:

image description

The behavior I was expecting was the hexapod at its zero position; standing.

I, also, implemented a simple plugin for setting the joints to their zero position at every update, but if I use SetPosition physics explode and if I use PID controllers and SetForce I need to specify the PID gains (which I want to avoid - setting dummy pid gains like 1,0,0.1 does not work). Here's what I get when I use SetPosition: C:\fakepath\hexa.gif

Any ideas?

For reference I am attaching the sdf file: C:\fakepath\pexod.sdf

Thanks in advance!

Asked by costashatz on 2015-11-12 04:41:09 UTC

Comments

Answers

I know this is an old question but I think even now because knowing how to create an hexapod with plugin that moves the robot around and with an SDF model not a URDF might be usefull to someone.

I made a video answer explaining a bit the process and the result here VideoAnswer image description

So I there wasn't anything wrong with the model. It must have been something related to the plugin or some strange library error.

I essentially created a gazebo plugin that moves the joints using SetPosition and PIDs and it works just fine. I'm posting here the code I can.

Hope this is usefull.

spawn_sdf_robotdesc.launch

spawn_pexapod.launch

pexod.sdf

CMakeLists.txt.sdf

pexod_plugin.cc

Asked by Duckfrost on 2017-08-14 13:11:57 UTC

Comments

Could you post the move_hexapod.py? I'm a new guy and don't konw how to control it through ros. Did you sent the control command through topic?

Asked by littleghost on 2018-02-25 23:38:05 UTC

https://gist.github.com/RDaneelOlivav/f3726889ec1cf2c7f6bc4b7d57afb665

There you have a ghist of the code

Asked by Duckfrost on 2018-06-22 05:13:33 UTC

Plugin file is so useful, could you please post all of files? your ROS development studio may contains more files, I follow your instructions and add these files to my RDS but haven't implemented the predicted outcome. Is there any other way to perform this simulation rather than using ROS development studio?

Thanks so much for your help~~

Asked by AbnerNiu on 2018-12-04 16:43:34 UTC