...
POST No. 2591786
터틀봇3 bringup 문의
2022-01-22 23:31:55 n164056319929745

안녕하세요. bringup문제로 몇날며칠을 애먹고 있습니다.

gazebo를 통해서는 cartographer, teleop 잘 되는 거 확인했습니다.  

 

버전은 foxy lst 20.04입니다. 

 

1. ros2 service list에

 

/launch_ros/describe_parameters
/launch_ros/get_parameter_types
/launch_ros/get_parameters
/launch_ros/list_parameters
/launch_ros/set_parameters
/launch_ros/set_parameters_atomically

이 존재하지 않습니다.

2. ros2 launch turtlebot3_bringup robot.launch.py를 실행하면

/opt/ros/foxy/share/hls_lfcd_lds_driver/launch/hlds_laser.launch.py:46: UserWarning: The parameter 'node_executable' is deprecated, use 'executable' instead
Node(
/opt/ros/foxy/share/hls_lfcd_lds_driver/launch/hlds_laser.launch.py:46: UserWarning: The parameter 'node_name' is deprecated, use 'name' instead
Node(

이 뜹니다.

3.
ros2 launch turtlebot3_bringup rviz2.launch.py
에 아무것도 뜨지 않습니다.

4.
ssh ubuntu에서 bringup을 한 후
remote PC 에서
export TURTLEBOT3_MODEL=burger
ros2 run turtlebot3_teleop teleop_keyboard
를 실행하였는데, 키가 먹지 않습니다

5.
ros2 launch turtlebot3_bringup robot.launch.py
를 실행하면 나오는 로그 중

[robot_state_publisher-1] Initialize urdf model from file: /home/ubuntu/turtlebot_ws/install/turtlebot3_description/share/turtlebot3_description/urdf/turtlebot3_burger.urdf
에 해당하는 로그가 없습니다.

-------------

다음과 같이 진행했습니다.

 

$ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros2_foxy.sh
$ sudo chmod 755 ./install_ros2_foxy.sh
$ bash ./install_ros2_foxy.sh

$ sudo apt-get install ros-foxy-gazebo-*


$ sudo apt install ros-foxy-cartographer $ sudo apt install ros-foxy-cartographer-ros

$ sudo apt install ros-foxy-navigation2 $ sudo apt install ros-foxy-nav2-bringup

$ source ~/.bashrc $ sudo apt install ros-foxy-dynamixel-sdk $ sudo apt install ros-foxy-turtlebot3-msgs $ sudo apt install ros-foxy-turtlebot3

$ sudo apt remove ros-foxy-turtlebot3-msgs $ sudo apt remove ros-foxy-turtlebot3 $ mkdir -p ~/turtlebot3_ws/src $ cd ~/turtlebot3_ws/src/ $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/DynamixelSDK.git $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3.git $ cd ~/turtlebot3_ws $ colcon build --symlink-install $ echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc $ source ~/.bashrc

$ echo 'export ROS_DOMAIN_ID=50 #TURTLEBOT3' >> ~/.bashrc $ source ~/.bashrc
-------------------------
raspberrypi imager로 img 구웠습니다.

$ sudo nano /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0";


$ sudo nano /etc/netplan/50-cloud-init.yaml //동일 와이파이


$ sudo reboot

$ systemctl mask systemd-networkd-wait-online.service
$ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.targe
$ ssh ubuntu@{IP Address of Raspberry PI}
sudo apt update $ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros2_foxy_rpi.sh $ chmod 755 ./install_ros2_foxy_rpi.sh $ bash ./install_ros2_foxy_rpi.sh

$ sudo apt install python3-argcomplete python3-colcon-common-extensions libboost-system-dev build-essential $ sudo apt install ros-foxy-hls-lfcd-lds-driver $ sudo apt install ros-foxy-turtlebot3-msgs $ sudo apt install ros-foxy-dynamixel-sdk $ mkdir -p ~/turtlebot3_ws/src && cd ~/turtlebot3_ws/src $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3.git $ cd ~/turtlebot3_ws/src/turtlebot3 $ rm -r turtlebot3_cartographer turtlebot3_navigation2 $ cd ~/turtlebot3_ws/ $ echo 'source /opt/ros/foxy/setup.bash' >> ~/.bashrc $ source ~/.bashrc $ colcon build --symlink-install --parallel-workers 1 $ echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc $ source ~/.bashrc
$ sudo cp `ros2 pkg prefix turtlebot3_bringup`/share/turtlebot3_bringup/script/99-turtlebot3-cdc.rules /etc/udev/rules.d/ $ sudo udevadm control --reload-rules $ sudo udevadm trigger

$ echo 'export ROS_DOMAIN_ID=50 #TURTLEBOT3' >> ~/.bashrc $ source ~/.bashrc
------------------

ssh ubuntu에 접속한 상태입니다.

$ sudo dpkg --add-architecture armhf $ sudo apt update $ sudo apt install libc6:armhf

$ export OPENCR_PORT=/dev/ttyACM0 $ export OPENCR_MODEL=burger $ rm -rf ./opencr_update.tar.bz2

$ wget https://github.com/ROBOTIS-GIT/OpenCR-Binaries/raw/master/turtlebot3/ROS2/latest/opencr_update.tar.bz2 $ tar -xjf ./opencr_update.tar.bz2

$ cd ~/opencr_update $ ./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr
---------------------
ssh에 접속한 상태입니다.

$ export TURTLEBOT3_MODEL=burger $ ros2 launch turtlebot3_bringup robot.launch.py

에서 문제가 생긴 것입니다.
2022-01-22 23:31:55
n164056319929745
2022-01-24 16:32:57 손의형

안녕하세요,

 

터틀봇3의 라즈베리파이에 eManual에서 제공된 이미지를 설치하신 경우 네트워크 설정과 ROS_DOMAIN_ID 설정 이후 별다른 설치를 진행하실 필요가 없습니다.

아래의 명령어는 Foxy를 라즈베리파이에 수동으로 설치할 때 사용하는 스크립트이므로, 이미 설치된 ROS를 다시 설치하는 불필요한 과정이 생기며, 이로 인해 알 수 없는 문제가 생길 수 있습니다.

$ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros2_foxy_rpi.sh 

 

Remote PC와 터틀봇3의 라즈베리파이를 동일한 네트워크 대역으로 연결하고(예: 192.168.0.xxx) 다른 PC 또는 터틀봇과 중복되지 않는 고유의 ROS_DOMAIN_ID(기본값 : 30)로 설정되어 있다면 터틀봇3의 bringup 이후 PC에서 실행된 teleop이 동작해야 합니다.

 

아래의 커맨드를 PC에서 입력할 경우 

$ ros2 topic list
아래와 같은 토픽의 목록들이 보여야 정상적으로 연결된 것으로 판단할 수 있습니다.

/battery_state
/cmd_vel
/imu
/joint_states
/magnetic_field
/odom
/parameter_events
/robot_description
/rosout
/scan
/sensor_state
/tf
/tf_static

 

만약 정상적으로 연결됐음에도 동작하지 않는다면 네트워크 라우터에서 특정 범위의 포트가 막혀있지 않은지 확인해주시기 바랍니다.

감사합니다.

comment
2022-01-24 21:19:31 n164056319929745
집에 있는 sk giga wifi 공유기를 공유 와이파이로 설정했다가
iptime으로 바뀌니까 해결됐습니다.
이게 왜 그런지 알 수 있을까요?
2022-01-24 21:19:31
n164056319929745
2022-04-30 02:20:50 k165125166926201
저도 SK GIGA사용중인데 , iptime은 따로 없어서 질문자님의 해결책을 테스트 해보진 못하지만
[turtlebot3_ros-3] [ERROR]: Failed to open the port(/dev/ttyACM0)!
[turtlebot3_ros-3] [ERROR]: Failed to initialize SDK handlers
[turtlebot3_ros-3] [ERROR]: Failed connection with Devices
에러가 납니다.

e-menual에는 SBC랑 PC를 USB로 연결하라는 말은 없는거 같은데,
failed to open the port(/dev/ttyACM0)에러를 어떻게 해결하나요?

[ifconfig 결과]
Remote PC IP = 1xx.xxx.xx.3
Turtlebot3 IP = 1xx.xxx.xx.5
동일 와이파이를 연결해도
끝자리 숫자 한개가 좀 다르게 나오는데, 이부분의 문제일까요?
2022-04-30 02:20:50
k165125166926201
2022-01-24 16:32:57
will_son