sudo apt install python3-colcon-common-extensions -y
sudo apt-get install python3-pip -y
pip3 install setuptools==58.2.0
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> ~/.bashrc
cd ~
mkdir ros2_ws
cd ros2_ws
mkdir src
colcon build
echo "source ~/ros2_ws/install/setup.bash" >> ~/.bashrc
cd ~/ros2_ws/src/
ros2 pkg create my_robot_controller --build-type ament_python --dependencies rclpy
cd ..
colcon build
Starting >>> my_robot_controller
Finished <<< my_robot_controller [1.17s]
Summary: 1 package finished [1.37s]
cd src/my_robot_controller/my_robot_controller/
touch my_first_node.py
sudo chmod +x my_first_node.py