Simulation environment problem

Hi,
I’m currently working on the Wall Follower project from the ROS Basics in 5 Days: Course Project, but I’m having some issues getting the simulation environment to run properly.

When I try to launch the simulation using: “roslaunch realrobotlab main.launch”
I get this error: “RLException: [main.launch] is neither a launch file in package [realrobotlab] nor is [realrobotlab] a launch file name
The traceback for the exception was written to the log file”``

I also ran rospack list, and it looks like there’s no package called realrobotlab in the workspace.
Right now, the simulation environment doesn’t load — Gazebo just shows a blank screen and no robot appears. Because of this, I can’t test or move forward with the wall following behavior.

Could you please help me get the simulation working again? I’d really appreciate any guidance so I can continue with the project and eventually test it on the real robot.

Try doing

$ sudo apt update 
$ sudo apt upgrade

Not sure if that will work though

This error happens when you have not sourced the right workspace. Did you run the source command before the roslaunch command?

I tried that; It didn’t work!
I’m not sure if the realrobotlab* package is still part of my local catkin_ws`

user:~$ source ~/catkin_ws/devel/setup.bashuser:~$ roslaunch realrobotlab main.launch
RLException: [main.launch] is neither a launch file in package [realrobotlab] nor is [realrobotlab] a launch file name
The traceback for the exception was written to the log file
user:~$ cd ~/catkin_ws
user:~/catkin_ws$ source devel/setup.bash
user:~/catkin_ws$ roslaunch realrobotlab main.launch
RLException: [main.launch] is neither a launch file in package [realrobotlab] nor is [realrobotlab] a launch file name
The traceback for the exception was written to the log file
user:~/catkin_ws$ source ~/catkin_ws/devel/setup.bash && roslaunch realrobotlab main.launch
RLException: [main.launch] is neither a launch file in package [realrobotlab] nor is [realrobotlab] a launch file name
The traceback for the exception was written to the log file
user:~/catkin_ws$ rospack list | grep realrobotlab
user:~/catkin_ws$ cd ~/catkin_ws/src
user:~/catkin_ws/src$ ls
CMakeLists.txt scan_test wall_follower

user:~/catkin_ws/src$ source /home/user/catkin_ws/devel/setup.bash
user:~/catkin_ws/src$ roscd realrobotlab
roscd: No such package/stack ‘realrobotlab’
user:~/catkin_ws/src$

I apologize - the source command is missing from the notebook. The simulation is in the ~/simulation_ws workspace. The source command is:

source ~/simulation_ws/devel/setup.bash

It works after sourcing this workspace. We’ll look into fixing that notebook.