I am new to ros2 and have very little experience with it. Looking in to the documentation I have seen how to create a workspace in ros by cloning a github repository of your respective distro from their branch. Is there any other way to create a ros2 workspace with a single line terminal command similar to the one we use for creating a package in ros2. According to my knowledge I hope creating a workspace is necessary in order to create a package and run it. Thank you!
1 Answer
Basically a workspace in ROS is just a folder, which can be identified by ROS when sourcing the
install/setup.bash
file. So.. you do not need to download a pkg for creating a workspace, but just create a normal folder as you normally would do and most important create a subdirectory src
in it, where you store your packages. Clear? Inside the src
folder you can then create package with ros2 pkg create --build-type ament_cmake <package_name>
install/setup.bash
file. So.. you do not need to download a pkg for creating a workspace, but just create a normal folder as you normally would do and most important create a subdirectorysrc
in it, where you store your packages. Clear? Inside the 'src' folder you can then create package with `ros2 pkg create --build-type ament_cmake <package_name> Is it now clear? $\endgroup$