ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

spawning a simple_box in gazebo, box oscillates

asked 2012-04-24 19:46:17 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

With electric running on Ubuntu 11.10, if I run the following two commands

roslaunch gazebo_worlds empty_world.launch
roslaunch gazebo_worlds simple_box.launch

I would expect to get a 5cm by 5m by 10cm box spawned at position (1,0,2). Effectively, that is what happens. But then the box starts oscillating around (0,0,2), moving from (1,0,2) to (-1,0,2). I don't understand why this is happening. Is there something I'm missing here?

Thanks,

-J

edit retag flag offensive close merge delete

Comments

Yes ! it oscillates as a pendulum !

Arkapravo gravatar image Arkapravo  ( 2012-04-25 19:53:30 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-04-25 17:10:13 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

looking my simple_box.urdf I've got:

  <joint name="my_box_joint" type="continuous" >
    <!-- axis is in the parent link frame coordintates -->
    <axis xyz="0 1 0" />
    <parent link="world" />
    <child link="my_box" />
    <!-- initial pose of my_box joint/link in the parent frame coordiantes -->
    <origin xyz="0 0 2" rpy="0 0 0" />
  </joint>

So looking at the rest of the urdf: the joint is at (0 0 2) and the mass is centered at (1 0 2). So the mass should pivot around (0 0 2) since gravity is acting on the box.

edit flag offensive delete link more
0

answered 2012-04-25 23:57:06 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

If you want to stop it from oscillating then look close to the end of the simple_box.urdf file;

<turnGravityOff>false</turnGravityOff>

make the false into true. Gravity will stop acting and oscillations will stop.

Have a look at the following screenshot, simple_box_1 is stationary while simple_box is oscillating.

image description

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-04-24 19:46:17 -0600

Seen: 900 times

Last updated: Apr 26 '12