[ROS]run DR robot in ROS - installing note2

Installation history to run DR robot in ROS
Feb 22, 2024
[ROS]run DR robot in ROS - installing note2
DR source required
ros-noetic && Ubuntu 20.04 version
ros2-foxy&& Ubuntu 20.04 version

ROS-related files and other pre-run checks

apt upgrade โ†’ Avoid using the ROS version because it is fixed
apt update updates the list of packages to the latest, and apt upgrade upgrades the packages currently installed on your system to the latest version. It is usually a good habit of managing packages to perform an upgrade after an update.
source ~/catkin_ws/devel/setup.bash โ†’ The source ~/catkin_ws/devel/setup.bash command is used to execute the contents of the setup.bash script in your ROS workspace (catkin_ws). This command is typically run in your terminal to set up the environment variables and paths required for ROS to work with the packages and executables in your workspace.
roscore โ†’ Start ros package

โœ… Installing ROS netoic in Ubuntu20.04 Environment with Window 10 โ†’ WSL1(2)

Finally this method can run DR source in ROS
I tried installing ROS through Windows WSL.

Update of graphics tools is required to run Rviz, gazebo, etc

Install for each GPU company
After downloading, installing and rebooting

WSL2 Activation

WSL1 is enabled by default on Windows, which is set to enable WSL2
Open Windows PowerShell as administrator and type the command below
>> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart >> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Enable WSL2 by default
>> wsl --set-default-version 2

You need to download the Linux kernel package when it's WSL2.

WslRegisterDistribution failed with error: 0x800701bc โ†’ Install when the following error message occurs during installation โ€ข WSL2 Linux kernel update package for x64 machines
์„ค์น˜ ๊ฐ€๋Šฅํ•œ ๋ฒ„์ „ํ™•์ธ
  • Hyper-V (I donโ€™t know why but this function not exist in WIndows11 Home edition)
  • Windows Hypervisor Platform
  • Virtual machine platform
For your information, "Turn on/off Windows" comes out as soon as you search by pressing Win+S.
notion image
notion image

Enable to run Ubuntu version list in WSL

wsl -l -o Check the enable the version by use command
wsl --unregister <name_version> โ†’ Delete previously deleted Linux
wsl --install -d <name_version>
Open Ubuntu terminal()
Installation from ROS1
After install the ROS, make a directory home/<name>/catkin_ws/src
### We recommand the /home/<user_home>/catkin_ws/src cd ~/catkin_ws/src git clone https://github.com/doosan-robotics/doosan-robot rosdep install --from-paths doosan-robot --ignore-src --rosdistro noetic -r -y ##### Serial Package source build ### Noetic distro does not support serial package, so you have to install it manually. cd ~/catkin_ws/src git clone https://github.com/wjwwood/serial.git
Setting environmental variables (WSL2 operates without additional modifications)
nano ~/.bashrc and add those commands in very bottom line
export CATKIN_WS_PATH=~/catkin_ws export ROS_PACKAGE_PATH=$CATKIN_WS_PATH/src/doosan-robot:$ROS_PACKAGE_PATH export DISPLAY_NUMBER="0.0" export LIBGL_ALWAYS_INDIRECT= export DISPLAY=:0 alias noetic="source /opt/ros/noetic/setup.bash"
Installation of the packages required to run (installation takes time)
sudo apt-get install ros-noetic-rqt* ros-noetic-moveit* ros-noetic-gazebo-ros-control ros-noetic-joint-state-controller ros-noetic-effort-controllers ros-noetic-position-controllers ros-noetic-ros-controllers ros-noetic-ros-control ros-noetic-joint-state-publisher-gui ros-noetic-joint-state-publisher
sudo apt install python3-pip
catkin_make โ†’ If the command does not work, proceed with the following method
cd /home/<user_name>/catkin_ws/src git clone https://github.com/ros/catkin.git
And then catkin clean โ†’ catkin build

Error - Turned off as soon as rviz turns on

forcing opengl version 0. segmentation fault
notion image
kimkh@SotatekKR:~/catkin_ws$ glxgears Segmentation fault kimkh@SotatekKR:~/catkin_ws$ glxinfo | grep 'OpenGL renderer' OpenGL renderer string: D3D12 (Intel(R) Iris(R) Xe Graphics)
Looking at the OpenGL render string sentence, it seemed necessary to install the Intel Graphics Update Tool.
  • It worked normally after updating the graphic tool written at the top of the blog.
After build completed,
ROS Preferences:
  • Run setup.bash script before run roscore
    • bashCopy code source ~/catkin_ws/devel/setup.bash

Install the following X-server program because the Rivz gaezo GUI is not visible in WSL

If you use WSL2 on Windows 10 Build 19044+ or Windows 11, you can use gui without a separate program like xming.
wsl --update After proceeding, proceeding with the following procedures
Xwindow install
sudo apt-get install x11-apps xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic


In one terminal run "roscore" Then, in a new terminal do "rosrun rviz rvizโ€
notion image
roslaunch dsr_launcher dsr_moveit_gazebo.launch
notion image

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Result

WSL1,2 - Window10
notion image
GPU Issueโ€ฆ
notion image
WSL2 - Window11
notion image

๐Ÿ“š Reference

  • DR Open-source
  • Installing ROS netoic in Ubuntu20.04 Environment with Window 10 โ†’ WSL1(2)
Ros - WSL ํ™˜๊ฒฝ์—์„œ ์„ค์น˜ํ•˜๊ธฐ
์ €๋ฒˆํฌ์ŠคํŒ…์€ window 10 homeํ™˜๊ฒฝ์—์„œ ROS๋ฅผ ์„ค์น˜ํ›„ ์‚ฌ์šฉํ•˜๋Š”๊ฑฐ๋ผ๋ฉด ์ด๋ฒˆ์—๋Š” WSL(๋ฆฌ๋ˆ…์Šค์šฉ ์œˆ๋„์šฐ ํ•˜์œ„ ์‹œ์Šคํ…œ(Windows Subsystem for Linux, WSL)ํ™˜๊ฒฝ์—์„œ ROS๋ฅผ ์‚ฌ์šฉํ• ์ˆ˜์žˆ๊ฒŒ ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค ๋ฉ€ํ‹ฐ ๋ถ€ํŒ…์ด ๊ท€์ฐฎ์„ ๋•Œ ๊ต‰์žฅํžˆ ํŽธํ•ฉ๋‹ˆ๋‹ค ์ถœ์ฒ˜: wiki.ros.org/melodic/Installation/Ubuntu ๋ฅผํ†ตํ•ด ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค ์ „์ฒด์ ์ธ ์ˆœ์„œ๋Š” Ubuntu18.04 LTS ์„ค์น˜>ํ™˜๊ฒฝ์„ค์ •>ROS ์„ค์น˜>๋กœ์ŠคํŒจํ‚ค์ง€์„ค์น˜>ํ™˜๊ฒฝ์„ค์ •>Xserver์„ค์น˜>ํ…Œ์ŠคํŠธ์ž…๋‹ˆ๋‹ค Microsoft Store ์—์„œ Ubuntu 18.04 LTS ์„ค์น˜ ๋‹ค์šด๋ฐ›๊ณ ์‹คํ–‰ํ•˜์‹œ๋ฉด๋ฉ๋‹ˆ๋‹ค Ubunt๋ฅผ ์„ค์น˜ํ•˜์‹œ๊ณ  ์ผœ๋ณด๋ฉด ํ™˜๊ฒฝ์„ค์ •์ด ์•ˆ๋˜์žˆ๊ธฐ์— ์—๋Ÿฌ๊ฐ€ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค Ubunt๋ฅผ ์„ค์น˜ํ•˜์‹œ๊ณ  ์ผœ๋ณด๋ฉด ํ™˜๊ฒฝ์„ค์ •์ด ์•ˆ๋˜์žˆ๊ธฐ์— ์—๋Ÿฌ๊ฐ€ ์ถœ๋ ฅ..
Ros - WSL ํ™˜๊ฒฝ์—์„œ ์„ค์น˜ํ•˜๊ธฐ
WSL1์„ WSL2๋กœ ์—…๋ฐ์ดํŠธ ํ•˜๋Š” ๋ฐฉ๋ฒ• ubuntu18.04 WSL2 ์„ค์ •
์†Œ๊ฐœ ์œˆ๋„์šฐ ํ™˜๊ฒฝ์—์„œ wsl๋ฅผ ์ด์šฉํ•ด์„œ ubuntu18.04์— vscode๋ฅผ ์‹คํ–‰ํ•  ๋•Œ๋งˆ๋‹ค ์ž๊พธ๋งŒ ๋ฐ‘์— ์ด๋Ÿฐ ์ฐฝ์ด ๋œจ๋ฉด์„œ WSL2 ์—…๋ฐ์ดํŠธ๋ฅผ ์œ ๋„๋ฅผ ํ•˜๊ธธ๋ž˜ ๋ฐฉ๋ฒ•์„ ์ฐพ์•„๋ดค๋‹ค WSL 1 vs WSL 2 WSL 1๊ณผ๋Š” ๋‹ค๋ฅด๊ฒŒ WSL 2์—์„  Hyper-v ๊ธฐ๋ฐ˜์˜ ๊ฐ€์ƒํ™” ๊ธฐ์ˆ ์„ ์ด์šฉํ•˜์—ฌ ์ „์ฒด ๋ฆฌ๋ˆ…์Šค ์ปค๋„์„ ํƒ‘์žฌํ•ด์„œ ๋ชจ๋“  ์‹œ์Šคํ…œ์ด ํ˜ธํ™˜์ด ๋˜๊ณ  ์„ฑ๋Šฅ ๋˜ํ•œ ํ–ฅ์ƒ๋˜์—ˆ๋‹ค๊ณ  ํ•œ๋‹ค ์—…๋ฐ์ดํŠธ ๋ฐฉ๋ฒ• wsl 1์„ wsl 2๋กœ ์—…๋ฐ์ดํŠธ๋ฅผ ํ•˜๊ณ  ์ด๋ฏธ ์„ค์น˜๊ฐ€ ๋˜์–ด ์žˆ๋Š” ubuntu18.04๋ฅผ wsl ๋ฒ„์ „ 2๋กœ ์—…๋ฐ์ดํŠธ๋ฅผ ํ•˜๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•œ๋‹ค 1. Linux์šฉ Windows ํ•˜์œ„ ์‹œ์Šคํ…œ ์‚ฌ์šฉ PowerShell ๊ด€๋ฆฌ์ž ๊ถŒํ•œ์œผ๋กœ ์‹คํ–‰ ํ›„ ํ•ด๋‹น ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด์„œ ํ•˜์œ„ ์‹œ์Šคํ…œ ๊ด€๋ฆฌ ๋„๊ตฌ ์„ค์น˜ dism.exe /online /enable-fe..
WSL1์„ WSL2๋กœ ์—…๋ฐ์ดํŠธ ํ•˜๋Š” ๋ฐฉ๋ฒ• ubuntu18.04 WSL2 ์„ค์ •
Share article
RSSPowered by inblog