Gazebo | Ignition | Community
Ask Your Question

Getting joint angles for passive urdf model

asked 2016-07-05 15:18:20 -0600

klaatu gravatar image

updated 2016-07-05 18:32:56 -0600

I'm a bit confused about how to get joint states.

I'm trying to set up an inverted pendulum on a two-wheeled cart. I've successfully attached differential drive, and also control of the revolute joint for the pendulum rod.

But, now I want to remove any actuators and simply access the state of the passive model. E.g., I want to view the angle of the rod as it collapses under gravity from vertical to about horizontal.

Do I nevertheless need a joint_state_controller, or even position controllers? I'm simulating in gazebo, of course.

The joint_states I see published are empty.
seq: 105994
secs: 2120
nsecs: 302000000
frame_id: ''
name: []
position: []
velocity: []
effort: []

Here are links to the relevant files as they stand now...




Screenshot in Gazebo

My setup...
ROS Indigo, Gazebo 2.2.6.
Linux Mint 17.3 (Rosa) 64-bit.
(3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux)

I'd love to get angular position and velocity for the three joints (turret_to_rod, motor_to_wheelleft, motor_to_wheellright).


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-07-06 01:55:50 -0600

Brosseau.F gravatar image

You can add a plugin in your robot description file:

<!--Publish joint state from Gazebo-->
        <plugin name="joint_state_publisher" filename="">
                turret_to_rod, motor_to_wheelleft, motor_to_wheellright
edit flag offensive delete link more


OK, thanks, that worked after I removed controller references in my my launch file. (Actually I now recall I had tried that before, but was disappointed to find no velocity data -- nor effort data.)

name: ['turret_to_rod', 'motor_to_wheelleft', 'motor_to_wheelright']
position: [-1.6200029645491254, 0.9563870177604148, 0.9066213357244619]
velocity: []
effort: []

I guess velocity and effort are not implemented?

klaatu gravatar imageklaatu ( 2016-07-06 10:31:38 -0600 )edit

Still no implementation in Kinetic on 16.04 or am I doing something wrong?

yossi.ovcharik gravatar imageyossi.ovcharik ( 2018-01-13 09:44:27 -0600 )edit

Question Tools

1 follower


Asked: 2016-07-05 15:18:20 -0600

Seen: 3,576 times

Last updated: Jul 06 '16