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

spawning spheres in gazebo as simulated point cloud

asked 2012-07-24 10:09:55 -0500

ncr7 gravatar image

So I'm working on spawning spheres in gazebo to simulate point clouds for probabilities. I have been able to spawn objects with the command line,

rosrun gazebo spawn_model -file /opt/ros/electric/stacks/simulator_gazebo/gazebo_worlds/objects/simple_box.urdf -urdf -x 1.18 -y .91 -z 1.549 -model box1

but it seems when spawning objects this way you can't make them static, or resize the objects.

Is there a way to spawn objects with the ability to make them unaffected by gravity and resize-able?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-24 15:21:27 -0500

You can make a static object .model file and just spawn that. For example, a static box model looks like this:

<?xml version="1.0" ?>
<model:physical name="small_box_model">
<!--  <xyz>   0.835  -0.55   0.5</xyz>
  <rpy>   0.0    0.0    30.0</rpy>-->
  <body:box name="small_box_body">
    <geom:box name="small_box_geom">
      <size>0.1 0.1 0.1</size>
      <mass> 0.05</mass>
        <size> 0.1 0.1 0.1</size>

By changing the 'static' tag to false, you'll get a object affected by gravity and colliding with other objects. I'm not sure about the scaling of a sphere though, I had some problems with that before (especially with the visuals getting scaled, but the collision model staying at 1m radius).

edit flag offensive delete link more

Question Tools


Asked: 2012-07-24 10:09:55 -0500

Seen: 652 times

Last updated: Jul 24 '12