Ask Your Question
0

Easiest way to control an inverted pendulum

asked 2013-06-26 10:19:41 -0600

Albatross gravatar image

updated 2013-06-27 06:23:23 -0600

I'm trying to create a simple model for a controller of an inverted pendulum.

What I have so far is a model that receives position and velocity from the pendulum, and outputs motor commands. What I want is a physical model that this controller can interact with (using ROS topics to communicate between the two)

I have a feeling this should be relatively simple, but I can't seem to find a good place to start. I think all I need is a rod with mass/intertia with a revolute joint attached to a cart, that can move linearly.

What would you suggest as the best way to set up this environment? I've looked at http://www.openrobots.org/morse/doc/stable/user/actuators/armature.html (armature actuators) in MORSE, but I'm not sure how to build a model that can use them properly.

Any help or suggestions will be much appreciated! :)

I've mostly been using MORSE/Blender, and I'd prefer to keep working with that simulator, but a solution using Gazebo would be okay as well

(I'm using ROS Fuerte on Debian Jessie, with Gazebo 1.7 and MORSE 1.0.1)

EDIT:

Just to follow up in case anyone else runs into a similar problem, here is a list of tutorials that I've found to be helpful:

Accessing and modifying joint state: http://gazebosim.org/wiki/Tutorials/1.3/intermediate/pid_control_joint Revolute joint for the pendulum: http://gazebosim.org/wiki/Tutorials/1.2/control_robot/animate_joint Creating a subscriber for ROS messages: http://gazebosim.org/wiki/Tutorials/1.5/ros_enabled_model_plugin Pendulum control for newer version of Gazebo (doesn't work for me, but might for you): http://gazebosim.org/wiki/Tutorials/1.9/Using_A_URDF_In_Gazebo

edit retag flag offensive close merge delete

Comments

Hello! Did a MORSE implementation ever get implemented? (and did you have to install MORSE from source to get this done?)

SL Remy gravatar imageSL Remy ( 2015-01-20 06:38:56 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-06-26 10:44:32 -0600

davinci gravatar image

Look here: http://gazebosim.org/wiki/Tutorials/1.3/intermediate/pid_control_joint

(be aware that Gazebo and ROS currently have some issues, not all the tutorials you will find will work on every Gazebo version)

edit flag offensive delete link more

Comments

Thanks! That helped a lot. Using pieces from that and various other tutorials, I've been able to put the pendulum together and send ROS messages to the plugin. What I'm stuck on now is how to use those messages to change the force on the joint, and how to read position and velocity. Any ideas?

Albatross gravatar imageAlbatross ( 2013-06-27 06:11:54 -0600 )edit

actually, I think I've figured it out now, was using stuff from a tutorial for a newer version of gazebo to access the joints, going to follow just the one you mentioned, and the syntax should work

Albatross gravatar imageAlbatross ( 2013-06-27 06:20:12 -0600 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2013-06-26 10:19:41 -0600

Seen: 1,286 times

Last updated: Jun 27 '13