작성자: 박준규
2023.01.22(일) Happy 설날~
https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.html
You should first create your ROS workspace. Let’s use the ros2_workspace
folder that we have created in M1 맥에 설치해보기 (ROS2).
In a new Terminal window, make an src
directory inside the ros2_workspace
directory:
mkdir -p ~/ros2_workspace/src
A single workspace can contain as many packages as you want, each in their own folder.
The best practice is to create your packages inside the src
folder of your ROS workspace.
Go to the workspace root (~/ros2_workspace
):
cd ~/ros2_workspace
Initialize rosdep installation:
sudo rosdep init
rosdep update
Go to your src
folder of your ros2_workspace
:
cd ~/ros2_workspace/src