Atom has been deprecated as of December 2022. I suggest removing the program and installing PyCharm or VS Code (which I use) instead. IntelliCode is a good VS Code package.
Installing on a MS host you can do this…
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo add-apt-repository “deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main”
sudo apt install code
Launch VS Code and install the package
code
Yes, adding source /opt/ros/melodic/setup.bash
to your .bashrc
file and running the source
command is a common and correct way to set up your ROS environment. This ensures that your ROS setup is loaded whenever you open a new terminal session.
To test that it works, follow these steps:
Step 1: Open a New Terminal
- Open a new terminal window to ensure the
.bashrc
file is sourced automatically.
Step 2: Verify Environment Variables
- Check if ROS environment variables are set by running:
echo $ROS_DISTRO
This should output melodic
.
- Check other ROS environment variables, such as:
echo $ROS_PACKAGE_PATH
Step 3: Run a ROS Command
- Try running a basic ROS command to see if ROS is properly set up. For example:
roscore
This should start the ROS master. If roscore
starts without any issues, your setup is correct.
Use Ctrl-C to exit roscore.
Step 4: Check ROS Nodes
- Open another terminal window and source the
.bashrc
file:
source ~/.bashrc
- List available ROS nodes:
rosnode list
If these commands work as expected, your ROS setup is correctly configured and the setup.bash
sourcing in your .bashrc
file is functioning as intended.
Let me know how it goes.