ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Launching a file after ROS re-installation

asked 2020-09-09 13:23:16 -0500

John999991 gravatar image

updated 2020-09-10 08:36:35 -0500

Dear all, I had installed ROS Kinetic for UBUNTU 16.04 and had prepared some launch files in a workspace having the following path: home/robot/robot/launch/gazebo.launch.

Now for some reason I uninstalled and re-installed ROS Kinetic and now, the launch file doesn't start.

I am not sure of what I am doing wrong. Any help appreciated.

Update: I was running:

roslaunch robot gazebo.launch.

Now if I run the afore-mentioned command I get:

[gazebo.launch] is neither a launch file in package [robot] nor is [robot] a launch file name
The traceback for the exception was written to the log file
edit retag flag offensive close merge delete

Comments

1

This question is pretty much impossible to answer without more details. Please update the question with exactly what commands you are running to start the launch file, and what errors you are receiving.

jarvisschultz gravatar image jarvisschultz  ( 2020-09-09 14:48:54 -0500 )edit

is ROS properly sourced?

in the same terminal where you try the launch:

source /opt/ros/kinetic/setup.bash

or inside .bashrc

You should source also your own workspace

Solrac3589 gravatar image Solrac3589  ( 2020-09-10 01:09:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-09-10 08:36:06 -0500

updated 2020-09-10 08:48:08 -0500

So for the command you are trying to run to work, you need to have followed all of the steps in the Creating a Catkin Workspace tutorial. Namely, you need a workspace, your robot package needs to be in that workspace, that workspace needs to successfully build with catkin_make, and you need to source the devel/setup.bash script generated when the workspace is built (as mentioned by @Solrac3589 ). Have you completed all of those steps? If it's still not working please edit your question and provide the output of env | grep ROS from the terminal where the launch file is not running correctly.

You could also further test if your package is found using rospack find robot. If that command successfully returns the location of your package in your catkin workspace, then we know the issue is with the launch file itself. Is there actually a gazebo.launch file in the robot package's directory? Does it have appropriate permissions? If the rospack command cannot find your package then something is wrong with the workspace or your environment.

Finally, one clarifying note on the comment from @Solrac3589 You definitely don't need to source both the /opt/ros/kinetic/setup.bash and the one in your workspace. Just the workspace setup.bash should be sufficient. Here are a few Q&As for reference:

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-09-09 13:23:16 -0500

Seen: 176 times

Last updated: Sep 10 '20