Skip to content

Instantly share code, notes, and snippets.

@gmp-prem
Last active October 9, 2023 06:33
Show Gist options
  • Select an option

  • Save gmp-prem/ca2d6266cb11e772acf59e87f4694dbb to your computer and use it in GitHub Desktop.

Select an option

Save gmp-prem/ca2d6266cb11e772acf59e87f4694dbb to your computer and use it in GitHub Desktop.
.bashrc notes
We can use command "rosdep" to perform auto-install the reuqired ROS dependency in the workspace
1. go to the workspace that you are working on
2. update the needed dependencies in the workspace using (this command will fetch the package that is EOL only,
if non-EOL ROS distribution, it will not fetch)
$ rosdep update
3. after update the ros dependencies, we can perform the auto installation from
$ rosdep install --from-paths src --ignore-src -r -y
4. after auto installation of missing packages, from the command above, must build the workspace
PS. not all packages will be fetched, some packages must be installed manually.
# ROS distro
source /opt/ros/noetic/setup.bash
# ros workspaces
source /home/hayashi/worksp/motoman_ws/devel/setup.bash
source /home/hayashi/worksp/camera_ws/devel/setup.bash
# ros network of this device
export ROS_MASTER=10.0.0.102
export ROS_MASTER_URI=http://10.0.0.102:11311
export ROS_IP=10.0.0.102
how to build multiple ROS1 workspace
steps
1. create main folder to keep all the workspace e.g. worksp folder
$ mkdir worksp
2. head inside the worksp folder
$ cd worksp
3. create the first ros workspace and its src folder e.g. named robot_ws
$ mkdir -p robot_ws/src
4. git, make or create the ros package as you want
5. build the ros workspace
6. add the source to the .bashrc and source it
$ source ~/worksp/robot_ws/devel/setup.bash
7. to build another ros workspace alongside with the first worksp, repeat from the step 3
but when creating the second ros workspace, create in the worksp folder
NOTE! Cuda toolkit will include the nvidia driver software already, no need to install separately !
but if you already installed nvidia driver before, it is okay, when installing the cuda toolkit, this will
delete the exist one and install the latest one for you.
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
After install the CUDA toolkit, should at this line and change to the correct CUDA version
to check CUDA version, after installalation of CUDA toolkit, restart PC and head to the /usr/local/
In this folder, you should see the CUDA and its version, then add this line to the .bashrc
export PATH=/usr/local/cuda-11.6/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64:$LD_LIBRARY_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment