0
$\begingroup$

Rosanswers logo

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 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


Originally posted by Albatross on ROS Answers with karma: 157 on 2013-06-26

Post score: 0


Original comments

Comment by SL Remy on 2015-01-20:
Hello! Did a MORSE implementation ever get implemented? (and did you have to install MORSE from source to get this done?)

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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)


Originally posted by davinci with karma: 2573 on 2013-06-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Albatross on 2013-06-27:
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?

Comment by Albatross on 2013-06-27:
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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.