Home | Tutorials | Wiki | Issues
Ask Your Question
0

An error in launching my custom world into Gazebo

asked 2014-02-17 16:11:46 -0600

Eman gravatar image

updated 2014-02-17 18:20:03 -0600

>     [MYROBOT.launch] is neither a launch file in package
> [MYROBOT_gazebo] nor is [MYROBOT_gazebo] a launch file name
  • my distribution is Hydro
  • I use ubuntu 12.10

any help,please

Thanks in advance

edit retag flag offensive close merge delete

Comments

Have you run catkin_make in that workspace before launching?

Ben B gravatar imageBen B ( 2014-02-17 18:25:46 -0600 )edit

5 Answers

Sort by » oldest newest most voted
0

answered 2014-02-18 01:09:17 -0600

Stefan Kohlbrecher gravatar image

updated 2014-02-18 02:51:35 -0600

This indicates some kind of problem with your workspace setup. Either your "MYROBOT_gazebo" package could not be found, or your "MYROBOT_gazebo" package could be found, but not the "MYROBOT.launch" launch file inside it. To find out what is happening, you can try

roscd MYROBOT_gazebo

If get a "no such package/stack" error, the package could not be found.

edit flag offensive delete link more

Comments

@Stefan Kohlbrecher Thanks very much for your help. God bless you. I tried the command " roscd MYROBOTgazebo " & I found the error that you mentioned ( roscd: No such package/stack 'MYROBOTgazebo' ) . what should I do if the package are not found? Should I remove the catkin_WS & then recreate it & recreate the package?

Eman gravatar imageEman ( 2014-02-18 03:09:36 -0600 )edit

This means you either made a mistake when following the tutorial, or there is an error in the tutorial. I´d suggest re-doing the tutorial and taking extra care not to miss anything. Hopefully that solves the problem, otherwise report back. Note that MYROBOT_gazebo should be replaced with your own package name, for example "eman_robot_gazebo". It seems the tutorial also requires some basic knowledge of how catkin and ROS work.

Stefan Kohlbrecher gravatar imageStefan Kohlbrecher ( 2014-02-18 04:25:25 -0600 )edit

Thanks a lot for your help. God bless you. Thanks also for your suggestion. I will re-do the tutorial with care of every thing & confirm basic knowledge of how catkin and ROS work.

Eman gravatar imageEman ( 2014-02-18 06:04:52 -0600 )edit
1

answered 2014-02-17 18:25:37 -0600

Ben B gravatar image

Have you run catkin_make in that workspace before launching?

edit flag offensive delete link more

Comments

Thanks for your help. God bless you. No,I have not run catkin_make in that workspace before launching.

Eman gravatar imageEman ( 2014-02-18 03:18:30 -0600 )edit

Then try to run it and try to roslaunch again! I think the build process somehow alerts ROS to the presence of the package.

Ben B gravatar imageBen B ( 2014-02-18 15:29:17 -0600 )edit

Thanks a lot for your help. The problem had been solved.

Eman gravatar imageEman ( 2014-02-21 12:41:12 -0600 )edit
0

answered 2014-02-21 14:09:32 -0600

Eman gravatar image

updated 2014-02-22 01:29:38 -0600

@Stefan Kohlbrecher @Ben B Thanks a lot for your help. All respect & appreciate to you.

  • This error happened because I didn't build the package after creating it.
  • For any one who is going to launch the custom world,

    To avoid this error, Build the
    package ((after creating it & before
    launching the custom world.))

In details >>>

- The steps that I followed to solve this problem & ((Thanks to God )) it had been solved ;with help of the following tutorials in roswiki.

1- first, I removed the catkin_WS

NOTE >> After removing the catkin_WS,you had an error in your terminal

>     bash:  /home/eman/catkin_WS/devel/setup.bash:
> No such file or directory

Don't worry about that error, it would be removed after recreating the catkin_WS.

2- Create the Catkin_WS using the following commands:

> mkdir -p ~/catkin_ws/src

> cd ~/catkin_ws/src

> catkin_init_workspace

3- Build the workspace using the following commands :-

> cd ~/catkin_ws/

>  catkin_make

4- Create the package using the following command:

  catkin_create_pkg Package_name package_dependencies
  • Replace package_name with your package name.

  • Replace package_dependencies with your package dependencies.

    For example, the command that I used to create my package is:

  > catkin_create_pkg eman_gazebo std_msgs rospy roscpp
  • where my package name is emangazebo & my package dependencies are stdmsgs rospy roscpp.

NOTE>>> To ensure that your package is found, use the following command:

rospack find  Package_name

For example, the command that I used to find my package is:

> rospack find eman_gazebo
  • If your package is found, it will return the path of your package ( it will be similar to the following path)
/home/eman/catkin_ws/src/eman_gazebo
  • your package must be in the src of your catkin_WS.

  • If your package is found (( in your home & not in the src of your catkinWS )), Put it in the src of your catkinWS.


5- Inside your package, Create 2 folders ( launch folder & worlds folder ).


6- Inside the launch folder, Create your launch file using text editor.

  • Type the following contents in your launch file:-
<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="$(find eman_gazebo)/worlds/eman_gazebo.world"/>
    <!-- more default parameters can be changed here -->
  </include>
</launch>

Note>>> in this line `

> <arg name="world_name" value="$(find eman_gazebo)/worlds/eman_gazebo.world"/>

`

  • replace emangazebo with your packagename.
  • replace emangazebo.world with your launchfile_name.

7-Inside the Worlds folder, Create your world file using text editor.

  • Type the following contents in your world file ( the world file is named for example eman_gazebo.world ):-
> <?xml version="1.0" ?>
>      <sdf version="1.4">
>       <world name="default">
>         <include>
>           <uri>model://ground_plane</uri>
>         </include>
>         <include>
>           <uri>model://sun</uri>
>         </include>
>         <include>
>           <uri>model://gas_station</uri>
>           <name>gas_station ...
(more)
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2014-02-17 16:11:46 -0600

Seen: 3,133 times

Last updated: Mar 01 '14