ROS/windows10

[ROS2] Windows10 ROS2 설치 - 03

Kim.Sung 2023. 5. 2. 16:36
728x90

1. Install ROS

  - ROS 터미널에 입력

 - set ChocolateyInstall=c:\opt\chocolatey
- choco source add -n=ros-win -s="https://aka.ms/ros/public" --priority=1
- choco upgrade ros-foxy-desktop -y --execution-timeout=0

2. colcon build

  - x64 Native Tools Command 사용 명령어 입력

- c:\opt\ros\foxy\x64\setup.bat
- mkdir c:\gcamp_ros2_ws\src
- pushd c:\gcamp_ros2_ws
- cd src
- git clone https://github.com/Road-Balance/gcamp_ros2_basic.git
- cd ../
- colcon build --symlink-install --packages-select gcamp_gazebo
- c:\gcamp_ros2_ws>colcon build --symlink-install --packages-select gcamp_gazebo

3. 터미널 uuid 

   - 터미널에 "uuidgen" 입력

   - 해당 터미널 id 을 알아내기 위한 명령어

   - 터미널 ROS 만들기 C++ 프로 버전 기준

{ "colorScheme": "One Half Dark", "commandline": "C:\\Windows\\System32\\cmd.exe /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\Tools\\VsDevCmd.bat\" -arch=amd64 -host_arch=amd64 && set ChocolateyInstall=c:\\opt\\chocolatey&& c:\\opt\\ros\\foxy\\x64\\setup.bat&& c:\\gcamp_ros2_ws\\install\\setup.bat", "guid": "{148f17ca-e084-4c06-8297-2d5d89738e54}", "hidden": false, "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "name": "ros2-foxy", "startingDirectory": "C:\\gcamp_ros2_ws" }

 

4. Gazebo Setup

  - Windows 터미널에 차례대로 입력

- setx -m HOME C:\gcamp_ros2_ws
- setx -m HOMEPATH C:\gcamp_ros2_ws
- setx -m GAZEBO_MASTER_URI http://localhost:11345
- setx -m GAZEBO_MODEL_DATABASE_URI http://models.gazebosim.org
- setx -m GAZEBO_RESOURCE_PATH C:\opt\ros\foxy\x64\share\gazebo-10
- setx -m GAZEBO_PLUGIN_PATH C:\opt\ros\foxy\x64\share\gazebo-10\plugins
- setx -m GAZEBO_MODEL_PATH C:\opt\ros\foxy\x64\share\gazebo-10\models
- setx -m SDF_PATH C:\opt\ros\foxy\x64\share\sdformat\1.6

5. Package Build

  - Windows 터미널에 차례대로 입력

- pushd C:\gcamp_ros2_ws
- colcon build --symlink-install --packages-select custom_interfaces
- colcon build --symlink-install --packages-select py_service_pkg
- colcon build --symlink-install --packages-select gcamp_gazebo
- install\setup.bat

설치 완료 화면

6. 로봇 조정

  - 터미널에 입력

- ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/skidbot
- ros2 run demo_nodes_py talker / listener

설치 끝

728x90

'ROS > windows10' 카테고리의 다른 글

[ROS] ROS2 Windows11 설치 - 02  (0) 2023.04.28
[ROS 설치] Windows10 ROS 설치 하기 01  (0) 2023.04.28