Gazebo | Ignition | Community
Ask Your Question

ynevatia's profile - activity

2014-08-20 08:33:25 -0500 received badge  Famous Question (source)
2014-07-09 15:03:26 -0500 received badge  Notable Question (source)
2014-07-09 15:03:26 -0500 received badge  Popular Question (source)
2014-04-16 16:28:01 -0500 received badge  Organizer (source)
2014-04-16 13:11:30 -0500 commented question Joint pose ignored when loading URDF in Gazebo 1.9.5

Also, I can move the links (not directly as urdf does not support a pose element) by adding an origin to the visual, inertial and collision blocks, but the joint remains at the origin of the parent - which is a problem for me!

2014-04-16 13:09:28 -0500 commented question Joint pose ignored when loading URDF in Gazebo 1.9.5

Also, I can move the links (not directly as urdf does not support a pose element) by adding an origin to the visual, inertial and collision blocks, but the joint remains at the origin of the parent - which is a problem for me!

2014-04-16 13:07:03 -0500 received badge  Commentator
2014-04-16 13:07:03 -0500 commented question Joint pose ignored when loading URDF in Gazebo 1.9.5

Spawning the model on a computer with Gazebo 1.9.2 (built from source) works fine - I am not sure which version of sdformat is used here. I compared the outputs of gzsdf print on this machine with that of the machine with the Gazebo 1.9.5 (installed from binaries) and they are identical.

2014-04-16 13:02:48 -0500 asked a question Joint pose ignored when loading URDF in Gazebo 1.9.5

Hi everybody!

As I am migrating custom models (as URDF) from Gazebo 1.9.2 to 1.9.5 (I realize I am behind the times a bit, but due to project restrictions - we had decided to stick to Version 1.9 between multiple partners), I have encountered issues where all the links are placed at the origin of the parent.

I tried creating a simple new model file to debug, with just two links and a joint between them, and I noticed that the joint offsets are not taken into account anymore.

Further, no matter where I spawn the model using gzclient, it appears at the origin of the world.

As you can see in the picture below (taken just before I spawn the model) both links are in the expected position in the model preview.

model preview just before spawning

However, when the model is spawned the link position changes relative to its parent (moved to the origin of the parent), and the model is not spawned where I expected. spawned model

The URDF code is as follows:

<robot name="scout">

<!-- LINKS -->
<link name='chassis_front'>
    <inertial>
                <origin xyz="-0.18 0 0" rpy="0 0 0" />
        <!-- inertia calculated as per moments of inertia for a cuboid, based on simple collision frame -->
        <inertia
                    ixx="0.06" ixy="0.0" ixz="0"
            iyy="0.242" iyz="0.0"
            izz="0.286"
        />
                <mass value="10.0" />
        </inertial>
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0" />
        <geometry>
            <mesh
                    filename="model://scout/meshes/ChassisFront_Combined.dae"
                    scale="1 1 1"
            />
        </geometry>
        </visual>
        <collision>
        <origin xyz="-0.23 0 0.06" rpy="0 0 0" />
        <geometry>
            <box size="0.57 0.43 0.12" />
        </geometry>
        </collision>

</link>

    <link name='chassis_back'>
        <inertial>
                <inertia
                    ixx="0.0" ixy="0" ixz="0"
                    iyy="0.0" iyz="0"
                    izz="0.0"
        />
                <mass value="0.01" />
        </inertial> 
        <visual>
        <geometry>
            <mesh
                filename="model://scout/meshes/ChassisBack.dae"
                    scale="1 1 1"
            />
        </geometry>
        </visual>

        <collision>
        <geometry>
            <box size="0.09 0.42 0.09" />
        </geometry>
        </collision>
    </link>



<!-- JOINTS -->
<joint name="chassis_front_back_hinge" type="continuous">
    <origin xyz="-0.581 0 0.01331" rpy="0 0 0" />
    <parent link="chassis_front" />
    <child link="chassis_back" />
    <axis xyz="1 0 0" />

- <limit velocity="100" effort="1000"/> </joint>

<gazebo>
    <static>false</static>
</gazebo>

</robot>

Any ideas how to fix this or get around it?

Thanks!

Yasho

2013-11-04 09:55:51 -0500 received badge  Famous Question (source)
2013-09-27 01:04:39 -0500 received badge  Famous Question (source)
2013-09-03 12:33:56 -0500 received badge  Notable Question (source)
2013-07-30 11:42:02 -0500 received badge  Teacher (source)
2013-07-30 11:42:02 -0500 received badge  Self-Learner (source)
2013-07-30 10:30:22 -0500 received badge  Popular Question (source)
2013-07-30 06:54:47 -0500 answered a question Differences in paths between gazebo and rosrun gazebo_ros gzserver

I finally figured out the problem: it lies with a conflict in the scripts in gazebo_ros/scripts and the way I setup the environment variables. the gazebo_ros scripts call the setup.sh from Gazebo, which was overwriting the environment variables I had set in my .bashrc with default values. without changing how I saw the environment variables outside the execution.

By commenting out the relevant lines in gazebo_ros/scripts/gazebo and building it again (for safety), roslaunch gazebo_ros mars_world.launch works.

2013-07-30 06:50:57 -0500 answered a question roslaunch gazebo_ros mars_world.launch cannot find mars.world

I finally figured out the problem: it lies with the scripts in gazebo_ros/scripts. These call the setup.sh from Gazebo, which was overwriting the environment variables I had set in my .bashrc with default values.

By commenting out the relevant lines in gazebo_ros/scripts/gazebo and building it again (for safety), roslaunch gazebo_ros mars_world.launch works.

2013-07-30 06:48:20 -0500 commented question Differences in paths between gazebo and rosrun gazebo_ros gzserver

The problem lies with the scripts in _gazebo\_ros/scripts_. These call the _setup.sh_ from Gazebo, which was overwriting the environment variables I had set in my .bashrc with default values.

2013-07-30 06:46:43 -0500 commented answer Differences in paths between gazebo and rosrun gazebo_ros gzserver

Hi Dave, I figured out what was the issue - the scripts in _gazebo\_ros_ call the gazebo _setup.sh_ which overwrites the environment variables (setup in the .bashrc) with default values. Removing this call from the scripts results in the models and world being loaded.

2013-07-30 05:50:31 -0500 commented answer Differences in paths between gazebo and rosrun gazebo_ros gzserver

You can also find the files at https://gist.github.com/ynevatia

2013-07-30 04:45:07 -0500 commented answer Differences in paths between gazebo and rosrun gazebo_ros gzserver

I also just noticed that the rosrun command only finds the mars.world file if it is in a local directory..

2013-07-30 04:44:36 -0500 commented answer Differences in paths between gazebo and rosrun gazebo_ros gzserver

GistGit doesnt seem to be able to find my files, so I've set up a github repo that you could use: https://github.com/ynevatia/testrepo.git - I've also added the output of rosrun gazeb_ros gazebo mars.world and the folder structure of the models directory.

2013-07-30 04:31:28 -0500 received badge  Notable Question (source)
2013-07-29 15:01:48 -0500 commented answer Differences in paths between gazebo and rosrun gazebo_ros gzserver

My models are as SDF files, referenced from a model database in /home/yn/faster_dev/branches/yn/gazebo/models. The world file is in /home/yn/faster_dev/branches/yn/gazebo/plugin. Both folders are in the GAZEBO_RESOURCE_PATH, and can be found when I run gzserver mars.world. rosrun gazebo_ros gzserver mars.world fails to load the world file, which lead me to wonder if the use different environment variables.

2013-07-29 15:00:07 -0500 received badge  Popular Question (source)
2013-07-27 03:56:02 -0500 asked a question Differences in paths between gazebo and rosrun gazebo_ros gzserver

Hi

I have my files in the following structure:

~/faster_dev/branches/yn/gazebo/plugin: mars.world
~/faster_dev/branches/yn/gazebo/models: model database, model.sdf files in subfolders
~/gazebo_source/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros

My environment variables are set up as follows:

GAZEBO_MODEL_PATH=:/home/yn/faster_dev/branches/yn/gazebo/models:/home/yn/faster_dev/trunk/gazebo/models GAZEBO_RESOURCE_PATH=/home/yn/local/share/gazebo-1.9:/home/yn/local/share/gazebo_models:/home/yn/faster_dev/branches/yn/gazebo/plugin:/home/yn/faster_dev/branches/yn/gazebo/models GAZEBO_MASTER_URI=http://localhost:11345 GAZEBO_PLUGIN_PATH=/home/yn/local/lib/gazebo-1.9/plugins:/home/yn/faster_dev/branches/yn/gazebo/plugin/build:/home/yn/faster_dev/trunk/gazebo/plugin/build GAZEBO_MODEL_DATABASE_URI=http://gazebosim.org/models

When I run "gazebo mars.world" from any location the world is loaded with all textures and models found, howvere 'rosrun gazebo_ros gzserver mars.world" can only find the world file if I run the command from folder containing the mars.world file, and in this case a number of resources (png for heightmap and textures) cannot be found.

Is there any difference in the paths or environment variables used by gazebo and gazebo_ros?

Yasho

2013-07-27 02:44:38 -0500 commented answer problem with finding library in gazebo 1.9.0

Hi Vahid, try -lsdformat instead of -lgazebo_sdf_interface, maybe that will help

2013-07-27 02:41:12 -0500 commented answer roslaunch gazebo_ros mars_world.launch cannot find mars.world

Hi Nate, I tried doing that and it gives the same error - with the launch file referencing either worlds/mars.world or just mars.world.

2013-07-26 15:19:24 -0500 answered a question problem with finding library in gazebo 1.9.0

From Version 1.9.0 SDF is now a separate library and cannot be linked through Gazebo.

You can find an overview at http://gazebosim.org/wiki/Tutorials/1.9/OverviewofnewROSintegration#Running_Gazebo

2013-07-26 15:04:42 -0500 commented answer problem with gazebo 1.9.0

Can you check the contents of the folder /usr/include/gazebo-1.9/gazebo?

2013-07-26 11:06:21 -0500 answered a question problem with gazebo 1.9.0

Hi Vahid

As you include path (-I/usr/include/gazebo-1.9/gazebo) includes the gazebo folder , your includes should be not include gazebo but should follow the format

#include "transport/transport.hh"
2013-07-26 11:00:02 -0500 received badge  Editor (source)
2013-07-26 10:57:05 -0500 asked a question roslaunch gazebo_ros mars_world.launch cannot find mars.world

Hi,

I have a question regarding the directory structure expected by gazebo_ros when launching it using roslaunch.

I am using ROS Groovy, with Gazebo 1.9 and gazeborospkgs built from source.

I have a catkin workspace with gazebo_ros, where I have copied the following launch file (into ~/gazebo_src/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/launch).

<launch>
  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="mars.world"/> <!-- Note: the world_name is with respect to GAZEBO_RESOURCE_PATH environmental variable -->
    <arg name="paused" value="false"/>
    <arg name="use_sim_time" value="true"/>
    <arg name="gui" value="true"/>
    <arg name="debug" value="false"/>
  </include>
</launch>

I need to keep the mars.world in a separate folder (internal/project repository) - ~/faster_dev/branches/yn/gazebo/plugin - which I have added to GAZEBO_RESOURCE_PATH. However when I try to launch gazebo with the command "roslaunch gazebo_ros mars_world.launch" I get the error that mars.world cannot be found.

I know that the mars.world works when I launch it with gazebo ("gazebo mars.world").

My environment variables are:

env | grep GAZEBO
GAZEBO_MODEL_PATH=:/home/yn/faster_dev/branches/yn/gazebo/models:
GAZEBO_RESOURCE_PATH=/home/yn/local/share/gazebo-1.9:/home/yn/local/share/gazebo_models:/home/yn/faster_dev/branches/yn/gazebo/plugin:/home/yn/faster_dev/branches/yn/gazebo/models
GAZEBO_MASTER_URI=http://localhost:11345
GAZEBO_PLUGIN_PATH=/home/yn/local/lib/gazebo-1.9/plugins:/home/yn/faster_dev/branches/yn/gazebo/plugin/build:/home/yn/faster_dev/trunk/gazebo/plugin/build
GAZEBO_MODEL_DATABASE_URI=http://gazebosim.org/models

The relevant folders are

gazebo_ros: ~/gazebo_source/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros
models: ~/faster_dev/branches/yn/gazebo/models (contains a databse.config and a number of models in subfolders)
world file: ~/faster_dev/branches/yn/gazebo/plugin
launch file: ~/gazebo_source/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/launch

Does anyone have any ideas why this could be giving me an error even though the world file path is correct (relative to GAZEBO_RESOURCE_PATH)?

I guess I could include "~/faster_dev/branches/yn/gazebo/plugin" in my global path, but I'd rather avoid this if possible..

Thanks!

Yasho