0
$\begingroup$

Rosanswers logo

Hello there,

I have quite a confusing problem. I created a custom Gazebo world that I am able to launch via:

$ gazebo /home/georg/catkin_ws/src/ml/worlds/chapter1_3.world

as well as with:

$ roslaunch gazebo_ros empty_world.launch world_name:="/home/georg/catkin_ws/src/ml/worlds/chapter1_3.world"

but with the following launchfile I can't manage

<launch>
    <arg name="world_file" default="$(find ml)/worlds/chapter1_3.world"/>

    <arg name="paused" default="false"/>
    <arg name="use_sim_time" default="true"/>
    <arg name="gui" default="true"/>
    <arg name="headless" default="false"/>
    <arg name="debug" default="false"/>
    <arg name="extra_gazebo_args" default="--verbose"/>

    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(arg world_file)"/>
        <arg name="paused" value="$(arg paused)"/>
        <arg name="use_sim_time" value="$(arg use_sim_time)"/>
        <arg name="gui" value="$(arg gui)"/>
        <arg name="headless" value="$(arg headless)"/>
        <arg name="debug" value="$(arg debug)"/>
        <arg name="extra_gazebo_args" value="$(arg extra_gazebo_args"/>
    </include>
</launch>

And I can use roscd mlto navigate to /home/georg/catkin_ws/src/ml.


Originally posted by GeorgNo on ROS Answers with karma: 183 on 2021-02-05

Post score: 1


Original comments

Comment by skpro19 on 2021-02-05:
What is the error that you are getting?

Comment by GeorgNo on 2021-02-05:
None, it just spawns the empty world.

Comment by GeorgNo on 2021-02-05:
After adding: <arg name="verbose" value="true"/> inside the include tag I can see the following error:

[Wrn] [SystemPaths.cc:459] File or path does not exist [""] [$(arg]
[Err] [Server.cc:444] Could not open file[$(arg]
[Wrn] [Server.cc:359] Falling back on worlds/empty.world

Replaced $(find ml)/worlds/chapter1_3.world with the absolute path and still the same error.

However if I run roslaunch gazebo_ros empty_world.launch verbose:="true" world_name:="/home/georg/catkin_ws/src/ml/worlds/chapter1_3.world the world spawns.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Had a typo at <arg name="extra_gazebo_args" value="$(arg extra_gazebo_args)"/> ...

Edit: Forgot the closing bracket, also needed to remove the line <arg name="extra_gazebo_args" value="$(arg extra_gazebo_args)"/> completely for it to work


Originally posted by GeorgNo with karma: 183 on 2021-02-05

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by skpro19 on 2021-02-05:
What was the typo?

Comment by skpro19 on 2021-02-05:
Also, can you please close this question as you have solved the issue at hand.

Comment by gvdhoorn on 2021-02-06:\

Also, can you please close this question as you have solved the issue at hand.

no, please don't.

Questions with answers should have the answer marked as accepted by clicking the little checkmark icon to the left of the answer.

Closing questions is reserved for duplicates, off-topic questions etc. Answered questions should not be closed.

Comment by skpro19 on 2021-02-06:
@gvdhoom Oh okay.

$\endgroup$

Your Answer

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