- I created this repository , so that fellow ros1 noetic developers have access to a dockerized ros-noetiv workspace on an ubuntu 20.04 base.
- This workspace can be minimzed and also be used for pure c++ development, using ros as a build and execute system.
- I have included turtlebot3 sim packages as examples , the model is set to burger
- ros and workspace devel/setup.bash is already added in .bashrc
- Install vs-code editor on your ubuntu 20.04 host OS : https://linuxize.com/post/how-to-install-visual-studio-code-on-ubuntu-20-04/
- Install docker on your ubuntu 20.04 host OS : https://docs.docker.com/engine/install/ubuntu/
- Please remember to follow all the steps in docker installation, and verifying it's successful installation @ https://docs.docker.com/engine/install/ubuntu/#next-steps > https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user (Step 1 2 3 4)
- Install following extensions on your VSCode:
- Clone this repository using:
git clone --recurse-submodules https://github.com/vedran97/ros1-workspace-template.git
- From the current working directory, cd to ros1-workspace-template repo which u just cloned
- Open a terminal in ros1-workspace-template and type
code .
- A VSCode popup should arise which says "Open folder in Container" where you choose Yes OR press F1,search for "Open Folder in Container" and execute the command
- Now wait for the build process to finish, once it's completed, you have a fully functional ROS1 workspace with example packages
- When the container is built for the first time, a error will popup saying "Failed to enable ROS Extension" , just choose the reload window option
- Set up ROS dependencies using the following section
- How to use this? Ans: Open this directory as a container(or not) and press "Ctrl+Shift+B" to get a drop down list of available tasks.
Like this:
- "ROS:Build a Package" task -> This task lets you build a selected few, or all packages. CMake parrallelism limits have been added to prevent crashing during builds.
- "ROS:Install ROS dependencies" task -> This task lets you install ros-deps which are mentioned in any package's package.xml file, which is included in this workspace.
- "ROS: Clean" task -> This task cleans the workspace off all build artifacts
- Run the VSCode task "ROS:Install ROS dependencies"
- Once all packages are built, in 1 terminal window, run "roslaunch turtlebot3_gazebo turtlebot3_world.launch"
- In another terminal window , run "rosrun open_loop_controller open_loop_controller_node"