Error with bashrc example 1.1

Hello everyone,

I am encountering some errors when trying to enter the simulation environment and run a specific example. Upon entering the environment, I receive the following error messages:

bash: sdwg: command not found
bash: /home/user/.bashrc: line 2: syntax error near unexpected token (' bash: /home/user/.bashrc: line 2: setup.bash ~/.bashrc: executed by bash(1) for non-login shells.’

Additionally, when attempting to run the first example using the command roslaunch publisher_example move.launch , I encounter the following error:

user@4_xterm:~$ roslaunch publisher_example move.launch
bash: roslaunch: command not found

I believe there might be an issue with my environment setup or some missing dependencies. Could someone please provide guidance on how to resolve these errors?

Thank you in advance for your help!

Hi @WINGS ,

Welcome to this Community!

When you get the roslaunch: command not found it means that ROS workspace has not been sourced on your current terminal/webshell.

To fix this issue, you must issue these command on your terminal:

source /opt/ros/noetic/setup.bash

This will make the commands like roslaunch work on terminal.

I assume there is some environment setup issues.
Try to reset the webshell or restart the course page when this issue occurs.
Let us know if this error persists.

Regards,
Girish

Hi @girishkumar.kannan

Thank you for your response and suggestions. I followed your instructions and sourced the ROS workspace using the command:
source /opt/ros/noetic/setup.bash

However, I am still encountering problem.

After sourcing the setup file, when I try to run the command:
user@4_xterm:~$ roslaunch publisher_example move.launch

I receive the following error:
RLException: [move.launch] is neither a launch file in package [publisher_example] nor is [publisher_example] a launch file name
The traceback for the exception was written to the log file

Could you please provide further assistance on how to resolve this issue? I appreciate your help.
Best regards,
WINGS

Hi @girishkumar.kannan
I am still encountering the same error.
At this point, I believe it would be helpful to reset the course or reset the IDE to ensure a clean environment. Could you please assist me with this request? I appreciate your understanding and support in resolving this issue.

Best regards,
WINGS

@WINGS
I see that your ~/.bashrc has been corrupted. Here is what you need to do.


  1. Launch this course.
  2. Modify and save your ~/.basrc: comment out the first two lines from the top. Those are preventing the file from executing properly.
vi ~/.bashrc
  1. Source the ~/.basrc on all web shells.
source ~/.basrc

Bingo! Everything should now work properly.

1 Like

@bayodesegun
Your advice to comment in the first two lines did the trick, and now everything is working smoothly again. I really appreciate your expertise and the time you took to assist me.
Thanks!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.