Set locale
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
Setup Sources
sudo apt install software-properties-common
sudo add-apt-repository universe#
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Install ROS 2 packages
sudo apt update
sudo apt upgrade
sudo apt install ros-humble-desktop
sudo apt install ros-humble-ros-base
sudo apt install ros-dev-tools
Environment setup,Configuring environment
# Replace ".bash" with your shell if you're not using bash
# Possible values are: setup.bash, setup.sh, setup.zsh
source /opt/ros/humble/setup.bash
#Add sourcing to your shell startup script
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
#Check environment variables
printenv | grep -i ROS
source ~/.bashrc
Try some examples
source /opt/ros/humble/setup.bash
ros2 run demo_nodes_cpp talker
source /opt/ros/humble/setup.bash
ros2 run demo_nodes_py listener
#
Uninstall
sudo apt remove ~nros-humble-* && sudo apt autoremove
remove repository
sudo rm /etc/apt/sources.list.d/ros2.list
sudo apt update
sudo apt autoremove
# Consider upgrading for packages previously shadowed.
sudo apt upgrade
#
'SW > ROS' 카테고리의 다른 글
[humble]Recording and playing back data (0) | 2024.03.19 |
---|---|
[humble] Using turtlesim, ros2, and rqt (0) | 2024.03.19 |
[Foxy] RQt Plugin, turtlebot GUI (0) | 2024.01.14 |
[Turtlebot3] Foxy, WiFi/HotSpot 원격 Setup (0) | 2023.12.26 |
[Foxy] 노드와 데이터 통신(topic/service/action/parm.) (0) | 2023.12.23 |