Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 젯슨
- Visual SLAM
- Simulation
- Puck LITE
- Gazebo
- DevOps
- 로봇
- 티스토리챌린지
- turtlebot3
- 터틀심
- ubuntu
- 자율탐사
- WSL2
- GUI
- ZED2
- 자율주행
- ROS
- C++
- U-blox
- QT
- 오블완
- Jetson
- SLAM
- 강화학습
- GPS
- RTK
- turtlesim
- WSL
- ROS2
- 인공지능
Archives
- Today
- Total
직관적인느낌
[자율주행][Simulation-Gazebo] leecar - 1.Create a Workspace (환경설정) 본문
728x90
반응형
Env
H.W | OS |
Laptop - CPU : AMD Ryzen 9 5900HS with Radeon Graphics 3.30 GHz - RAM : 16GB - GPU : 3050Ti |
Windows 11 & WSL2 ROS2 foxy |
1. Create a Workspace
mkdir -p ~/leecar_ws/src
2. Resolve Package Dependencies
cd leecar_ws
sudo apt upate
sudo apt install python3-colcon-common-extensions
colcon build
3. Source the Workspace
# sudo apt-get install gedit
gedit ~/.bashrc
# 아래의 경로를 추가, Add
source ~/leecar_ws/install/setup.bash
source /opt/ros/foxy/setup.bash
# 경로 추가 후, 업데이트
source ~/.bashrc
작업 공간 생성
ros2 pkg create --build-type ament_cmake leecar_ws
ros2 pkg create --build-type ament_python leecar_ws
ros2 pkg create --build-type ament_python leecar_ws --dependencies rclpy image_transport cv_bridge sensor_msgs std_msgs opencv2
- 빌드
cd ~/dev_ws/
colcon build
# 또는
colcon build --packages-select leecar_ws
ROS 2 Navigation
- Install & Build Nav2
sudo apt install ros-foxy-navigation2
sudo apt install ros-foxy-nav2-bringup
sudo apt install ros-foxy-turtlebot3*
sudo apt install ros-foxy-nav2-simple-commander
Build and Install — Navigation 2 1.0.0 documentation
mkdir -p ~/nav2_ws/src
cd ~/nav2_ws/src
git clone <https://github.com/ros-planning/navigation2.git> --branch foxy-devel
cd ~/nav2_ws
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro foxy
cd ~/nav2_ws
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro foxy
colcon build --symlink-install
# 시간좀 오래 걸림
gedit ~/.bashrc
# 이걸 맨 아래에 붙여 넣기
source ~/nav2_ws/install/setup.bash
export TURTLEBOT3_MODEL=waffle
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/foxy/share/turtlebot3_gazebo/models
source /usr/share/gazebo/setup.sh
cd ~/nav2_ws
colcon build
- Test Your Installation
cd ~/nav2_ws
ros2 launch nav2_bringup tb3_simulation_launch.py
- Install the SLAM Toolbox
sudo apt install ros-foxy-slam-toolbox
cd ~/nav2_ws
- 실행
ros2 launch nav2_bringup slam_launch.py
- 실행
ros2 launch nav2_bringup tb3_simulation_launch.py
# or
ros2 launch nav2_bringup tb3_simulation_launch.py slam:=True
728x90
반응형