Ros basics in 5 days quiz Error

Exception: [topics_quiz.launch] is neither a launch file in package [topics_quiz] nor is [topics_quiz] a launch file name

traceback for the exception was written to the log file

Hi, is this an error you are getting? Please explain your problem and add relevant information, like terminal output and code snippets. Have you compiled and sourced your environment?

cd catkin_ws/
rm -rf build/ devel/
catkin_make
source devel/setup.bash
rospack profile

user:~$ cd catkin_ws/user:~/catkin_ws$ rm -rf build/ devel/
user:~/catkin_ws$ catkin_makeBase path: /home/user/catkin_ws
Source space: /home/user/catkin_ws/src
Build space: /home/user/catkin_ws/build
Devel space: /home/user/catkin_ws/devel
Install space: /home/user/catkin_ws/install

Running command: “cmake /home/user/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/user/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/user/catkin_ws/install -G Unix Makefiles” in “/home/user/catkin_ws/build”

– The C compiler identification is GNU 9.3.0
– The CXX compiler identification is GNU 9.3.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Using CATKIN_DEVEL_PREFIX: /home/user/catkin_ws/devel
– Using CMAKE_PREFIX_PATH: /home/user/catkin_ws/devel;/home/simulations/public_sim_ws/devel;/opt/ros/noetic
– This workspace overlays: /home/user/catkin_ws/devel;/home/simulations/public_sim_ws/devel;/opt/ros/noetic
– Found PythonInterp: /usr/bin/python3 (found suitable version “3.8.5”, minimum required is “3”)
– Using PYTHON_EXECUTABLE: /usr/bin/python3
– Using Debian Python package layout
– Found PY_em: /usr/lib/python3/dist-packages/em.py
– Using empy: /usr/lib/python3/dist-packages/em.py
– Using CATKIN_ENABLE_TESTING: ON
– Call enable_testing()
– Using CATKIN_TEST_RESULTS_DIR: /home/user/catkin_ws/build/test_results
– Forcing gtest/gmock from source, though one was otherwise available.
– Found gtest sources under ‘/usr/src/googletest’: gtests will be built
– Found gmock sources under ‘/usr/src/googletest’: gmock will be built
– Found PythonInterp: /usr/bin/python3 (found version “3.8.5”)
– Found Threads: TRUE
– Using Python nosetests: /usr/bin/nosetests3
– catkin 0.8.9
– BUILD_SHARED_LIBS is on
– BUILD_SHARED_LIBS is on
– ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
– ~~ traversing 3 packages in topological order:
– ~~ - my_examples_pkg
– ~~ - my_package
– ~~ - tutorial
– ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
– +++ processing catkin package: ‘my_examples_pkg’
– ==> add_subdirectory(my_examples_pkg)
– +++ processing catkin package: ‘my_package’
– ==> add_subdirectory(my_package)
– +++ processing catkin package: ‘tutorial’
– ==> add_subdirectory(topics_quiz)
– Configuring done
– Generating done
– Build files have been written to: /home/user/catkin_ws/build

Running command: “make -j36 -l36” in “/home/user/catkin_ws/build”

user:~/catkin_ws$ source devel/setup.bash
user:~/catkin_ws$ rospack profile
Full tree crawl took 0.084447 seconds.
Directories marked with (*) contain no manifest. You may
want to delete these directories.
To get just of list of directories without manifests,
re-run the profile with --zombie-only

0.047781 /opt/ros/noetic/share
0.033695 /home/simulations/public_sim_ws/src
0.033376 /home/simulations/public_sim_ws/src/all
0.024474 /home/simulations/public_sim_ws/src/all/theconstruct_extra_models
0.020216 /home/simulations/public_sim_ws/src/all/theconstruct_extra_models/models
0.003667 * /home/simulations/public_sim_ws/src/all/theconstruct_extra_models/media
0.002572 * /opt/ros/noetic/share/doc
0.002496 * /opt/ros/noetic/share/doc/eigenpy
0.002429 /home/simulations/public_sim_ws/src/all/turtlebot
0.002251 * /home/simulations/public_sim_ws/src/all/theconstruct_extra_models/media/materials
0.001710 * /opt/ros/noetic/share/doc/eigenpy/doxygen-html
0.001441 /home/simulations/public_sim_ws/src/all/flexbe_tc
0.000886 /home/simulations/public_sim_ws/src/all/flexbe_tc/flexbe_behavior_engine
0.000824 * /home/simulations/public_sim_ws/src/all/theconstruct_extra_models/media/gui
0.000801 /home/simulations/public_sim_ws/src/all/ros_basics_examples
0.000771 * /home/simulations/public_sim_ws/src/all/theconstruct_extra_models/media/materials/programs
0.000605 * /home/simulations/public_sim_ws/src/all/theconstruct_extra_models/models/cafe
0.000529 /home/simulations/public_sim_ws/src/all/hector_gazebo
0.000518 /home/user/catkin_ws/src
0.000477 /home/simulations/public_sim_ws/src/all/turtlebot/turtlebot_create
user:~/catkin_ws$

There doesnt seem to be an error when i run this the error i get is:

RLException: [topics_quiz.launch] is neither a launch file in package [topics_quiz] nor is [topics_quiz] a launchfile name
The traceback for the exception was written to the log file

Assuming that you created the package and launch file correctly, then I see you still haven’t run

rospack profile

after compilation. This makes ROS go through all packages on your workspace to make them executable. If this doesn’t work, then I suggest you create your package and launch file from scratch, paying attention to each step described in the instructions.