0
$\begingroup$

Gazebo Answers logo

  1. where is the gazebo difault directory,I use virtualbox run ros and gazebo, I can only insert the default model from its default directory, and must use "sudo" command to modify the model file.so when I follow tutorial 'build a robot' , I can't insert the model from my created directory, why? Please help me.
  2. In the tutorial 'build a robot', after creating ~/.gazebo/models/manifest.xml file and ~/.gazebo/models/my_robot/model.sdf file, but I can not insert it , because I can not find the file and gazebo only can insert .model file, why? how to solute it?
  3. gazebo_models,but I find the example model in the opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/share/model, how can I change the default directory to my created directory ~/.gazebo/models/

thanks


Originally posted by lugd1229 on Gazebo Answers with karma: 75 on 2012-11-08

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Answered it earlier, i suggest just posting one question?

You can set the default directories for models using (go sudo gedit ~/.bashrc and add this for example)

export GAZEBO_MODEL_PATH=path/to/models 

For world files gazebo looks in your current directory (i think) and the resource path.

export GAZEBO_RESOURCE_PATH=path/to/worlds.

But you can always all this path stuff by creating a world file completely without inserts, yourworld.sdf

<?xml version="1.0" ?>
<gazebo version="1.2">
  <world name="default">
     <model name="yourmodel">
        <link name='yourlink'>
         <self_collide>false</self_collide>
          <pose>0.0000 0.0000 0.0000 0.000 0.000 0.000</pose>

          <collision name='yourlink'>
            <geometry>
            <box><size>0.6 0.5 0.34</size></box>
            </geometry>                 
          </collision>
          <visual name='yourlink'>
          <geometry>
             <box><size>0.6 0.5 0.34</size></box>
          </geometry>
        </visual>
      </link>    
     </model>
  </world>
</gazebo>

Save it as yourmodel.sdf. Then go in prompt and type gazebo yourmodel.sdf (in that directory)


Originally posted by Erik Stoltenborg with karma: 86 on 2012-11-09

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by mcevoy.andy on 2012-11-09:
it looks like lugd1229 is using ros, in which case the export commands wouldn't work right?

Comment by lugd1229 on 2012-11-09:
yes ,I use simulator_gazebo ,then I try to use plain gazebo, maybe it is more simple. thank you.

Comment by Erik Stoltenborg on 2012-11-09:
Ah yes, i missed the ROS in the first sentence. I guess it won't work.

$\endgroup$

Your Answer

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