Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't attach plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
$ gazebo worlds/car.world

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

Gazebo displays no error and the simulation seems to run. The problem is the plugin doesn't seem to run.

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
  </include>
</launch>

I thought the two methods where equivalent. Any idea how to get the plugin to work with the roslaunch command?

Cheers

Can't attach plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
$ gazebo worlds/car.world

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

Gazebo displays no error and the simulation seems to run. The problem is the plugin doesn't seem to run.

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
  </include>
</launch>

I thought the two methods where equivalent. Any idea how to get the plugin to work with the roslaunch command?

Cheers

Can't attach load plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
$ gazebo worlds/car.world

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

Gazebo displays no and I get te following error and the simulation seems :

[Err] [Plugin.hh:165] Failed to run. The problem is the plugin doesn't seem to run.

load plugin car_plugin/build/libcar_plugin.so: car_plugin/build/libcar_plugin.so: cannot open shared object file: No such file or directory

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
    <arg name="verbose" value="true" />
  </include>
</launch>

I thought the two methods where equivalent. Any idea how to get the plugin to work with the roslaunch command?

Cheers

Can't load plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

What works

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
$ gazebo worlds/car.world

What doesn't

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

and I get te following error :

[Err] [Plugin.hh:165] Failed to load plugin car_plugin/build/libcar_plugin.so: car_plugin/build/libcar_plugin.so: cannot open shared object file: No such file or directory

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
    <arg name="verbose" value="true" />
  </include>
</launch>

I thought the two methods where equivalent. Any idea how to get the plugin to work with the roslaunch command?

Cheers

Can't load plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

What works

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
$ gazebo worlds/car.world

What doesn't

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

and I get te following error :

[Err] [Plugin.hh:165] Failed to load plugin car_plugin/build/libcar_plugin.so: car_plugin/build/libcar_plugin.so: cannot open shared object file: No such file or directory

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
    <arg name="verbose" value="true" />
  </include>
</launch>

I thought the two methods where equivalent. Because I specified the environment variables in the <export> tag.

Any idea how to get the plugin to work with the roslaunch command?

Cheers

Can't load plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

What works

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
$ gazebo worlds/car.world

What doesn't

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

and I get te following error :

[Err] [Plugin.hh:165] Failed to load plugin car_plugin/build/libcar_plugin.so: car_plugin/build/libcar_plugin.so: cannot open shared object file: No such file or directory

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
    <arg name="verbose" value="true" />
  </include>
</launch>

I thought the two methods where equivalent. Because I specified the environment variables in the <export> tag.

Any idea how to get the plugin to work with the roslaunch command?

Cheers

Can't load plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

What works

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
$ gazebo worlds/car.world

What doesn't

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

and I get te following error :

[Err] [Plugin.hh:165] Failed to load plugin car_plugin/build/libcar_plugin.so: car_plugin/build/libcar_plugin.so: cannot open shared object file: No such file or directory

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
    <arg name="verbose" value="true" />
  </include>
</launch>

I thought the two methods where equivalent. Because I specified the environment variables in the <export> tag.tag. It actually allowed gazebo to find my model, but not my plugin. How come?

Any idea how to get the plugin to work with the roslaunch command?

Cheers

Can't load plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

What works

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
$ gazebo worlds/car.world

What doesn't

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

and I get te following error :

[Err] [Plugin.hh:165] Failed to load plugin car_plugin/build/libcar_plugin.so: car_plugin/build/libcar_plugin.so: cannot open shared object file: No such file or directory

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
    <arg name="verbose" value="true" />
  </include>
</launch>

My question

I thought the two methods where equivalent. Because I specified the environment variables in the <export> tag. It actually tag.

<gazebo_ros gazebo_model_path="${prefix}/models"/> allowed gazebo to find my model, but not while <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/> doesn't help find my plugin. How come?

Any idea how to get the plugin to work with the roslaunch command?

Cheers

Can't load plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <include>
        <uri>model://car</uri>
    </include>
    <plugin name="car_control" filename="car_plugin/build/libcar_plugin.so">
        <velocity>2</velocity>
    </plugin>
</model>

What works

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins/"
GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins"
$ gazebo worlds/car.world

What doesn't

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

and I get te following error :

[Err] [Plugin.hh:165] Failed to load plugin car_plugin/build/libcar_plugin.so: car_plugin/build/libcar_plugin.so: cannot open shared object file: No such file or directory

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>
<package>
    <name>car_gazebo</name>
        ...
    <run_depend>gazebo_ros</run_depend>
    <build_depend>gazebo_ros</build_depend>
    <buildtool_depend>catkin</buildtool_depend>

    <export>
        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>
    </export>
</package>

car.launch :

<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/car.world" />
    <arg name="verbose" value="true" />
  </include>
</launch>

My question

I thought the two methods where equivalent. Because I specified the environment variables in the <export> tag.

<gazebo_ros gazebo_model_path="${prefix}/models"/> allowed gazebo to find my model, while <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/> doesn't help find my plugin. How come?

Any idea how to get the plugin to work with the roslaunch command?

Cheers