Turtlebot3 Waffle NUC Humble Configure 20240426

From wikidb
Jump to: navigation, search

Goals

Goal is to install and configure missing stuff from the SBC instructions to see how much of the system we can bring up.

  • SBC Setup
    • let's see what we need starting in step 13. Suspect the install were already done

Install and Build ROS Package

Humble Already Installed

 $ sudo apt install python3-argcomplete python3-colcon-common-extensions libboost-system-dev build-essential

 $ sudo apt install ros-humble-hls-lfcd-lds-driver

 $ sudo apt install ros-humble-turtlebot3-msgs

 $ sudo apt install ros-humble-dynamixel-sdk

 $ sudo apt install libudev-dev

Set up the tutlebot3 Work Space

 $ mkdir -p ~/turtlebot3_ws/src && cd ~/turtlebot3_ws/src

 $ git clone -b humble-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
       Cloning into 'turtlebot3'...
       remote: Enumerating objects: 6636, done.
       remote: Counting objects: 100% (1342/1342), done.
       remote: Compressing objects: 100% (231/231), done.
       remote: Total 6636 (delta 1166), reused 1159 (delta 1111), pack-reused 5294
       Receiving objects: 100% (6636/6636), 119.99 MiB | 3.29 MiB/s, done.
       Resolving deltas: 100% (4155/4155), done.

 $ git clone -b ros2-devel https://github.com/ROBOTIS-GIT/ld08_driver.git
       Cloning into 'ld08_driver'...
       remote: Enumerating objects: 112, done.
       remote: Counting objects: 100% (112/112), done.
       remote: Compressing objects: 100% (48/48), done.
       remote: Total 112 (delta 50), reused 106 (delta 44), pack-reused 0
       Receiving objects: 100% (112/112), 40.16 KiB | 2.51 MiB/s, done.
       Resolving deltas: 100% (50/50), done.

set up for build

 $ cd ~/turtlebot3_ws/src/turtlebot3

 $ rm -r turtlebot3_cartographer turtlebot3_navigation2

 $ cd ~/turtlebot3_ws/

 $ echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc

 $ source ~/.bashrc
       bash: //: Is a directory

build

 $ colcon build --symlink-install --parallel-workers 1
       Starting >>> turtlebot3_description
       Finished <<< turtlebot3_description [0.79s]                  
       Starting >>> turtlebot3_node
       Finished <<< turtlebot3_node [18.5s]                       
       Starting >>> turtlebot3_example
       --- stderr: turtlebot3_example                    
       /usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
         warnings.warn(
       ---
       Finished <<< turtlebot3_example [0.75s]
       Starting >>> turtlebot3_teleop
       --- stderr: turtlebot3_teleop                    
       /usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
         warnings.warn(
       ---
       Finished <<< turtlebot3_teleop [1.00s]
       Starting >>> turtlebot3_bringup
       Finished <<< turtlebot3_bringup [0.63s]                   
       Starting >>> ld08_driver
       --- stderr: ld08_driver                               
       /home/eepp/turtlebot3_ws/src/ld08_driver/src/transform.cpp: In constructor ‘SlTransform::SlTransform(LDVersion, bool)’:
       /home/eepp/turtlebot3_ws/src/ld08_driver/src/transform.cpp:30:50: warning: unused parameter ‘to_right_hand’ [-Wunused-parameter]
          30 | SlTransform::SlTransform(LDVersion version, bool to_right_hand)
             |                                             17:06, 18 May 2024 (PDT)^17:06, 18 May 2024 (PDT)17:06, 18 May 2024 (PDT)~~
       ---
       Finished <<< ld08_driver [5.01s]
       Starting >>> turtlebot3
       Finished <<< turtlebot3 [0.62s]                   

       Summary: 7 packages finished [27.5s]
         3 packages had stderr output: ld08_driver turtlebot3_example turtlebot3_teleop

 $ echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc

 $ source ~/.bashrc
       bash: //: Is a directory

USB Port Setting for OpenCR

 $ sudo cp `ros2 pkg prefix turtlebot3_bringup`/share/turtlebot3_bringup/script/99-turtlebot3-cdc.rules /etc/udev/rules.d/
       [sudo] password for eepp: 

 $ sudo udevadm control --reload-rules

 $ sudo udevadm trigger

Copied Navigation Scripts from Hood

The are helper scripts implemented on the previous NUC

  $  mkdir scripts

  $  cd scripts/

  $  scp 10.0.0.111:scripts/make_map.sh .

  $  scp 10.0.0.111:scripts/nav2.sh .

  $  scp 10.0.0.111:scripts/keyboard_teleop.sh .

  $  scp 10.0.0.111:scripts/save_map.sh .

.. nav script

Signs of Life Test

 $ ls ../scripts/
       bringup.sh  keyboard_teleop.sh  make_map.sh  nav2.sh  save_map.sh

 $ source ../scripts/make_map.sh 
       [INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2024-04-26-20-39-41-135614-adams-19724
       [INFO] [launch]: Default logging verbosity is set to INFO

HW setup

  • connect Open CR and LDS to NUC
  • turn on Open CR - wait for tune
  • Boot NUC

Missing Stuff

 $ echo 'export LDS_MODEL=LDS-01' >> ~/.bashrc

 $ export TURTLEBOT3_MODEL=waffle

 $ source scripts/bringup.sh

 $ source scripts/keyboard_teleop.sh

clean up prompt

 $ diff .bashrc .bashrc~
     69,70c69
     < #    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
     <     PS1="\u@\h:\W$ "
     ---
     >     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"

 $ !diff
     diff .bashrc .bashrc~
     46c46
     < # force_color_prompt=yes
     ---
     > force_color_prompt=yes

Test Bringup

Termal 1

eepp@adams:~$ source scripts/bringup.sh 
[INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2024-04-27-16-46-31-655076-adams-3665
[INFO] [launch]: Default logging verbosity is set to INFO
urdf_file_name : turtlebot3_waffle.urdf
[INFO] [robot_state_publisher-1]: process started with pid [3666]
[INFO] [ld08_driver-2]: process started with pid [3668]
[INFO] [turtlebot3_ros-3]: process started with pid [3670]
[robot_state_publisher-1] [INFO] [1714261591.750238883] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-1] [INFO] [1714261591.750306842] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1714261591.750312389] [robot_state_publisher]: got segment base_scan
[robot_state_publisher-1] [INFO] [1714261591.750318932] [robot_state_publisher]: got segment camera_depth_frame
[robot_state_publisher-1] [INFO] [1714261591.750330003] [robot_state_publisher]: got segment camera_depth_optical_frame
[robot_state_publisher-1] [INFO] [1714261591.750333605] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-1] [INFO] [1714261591.750337029] [robot_state_publisher]: got segment camera_rgb_frame
[robot_state_publisher-1] [INFO] [1714261591.750340161] [robot_state_publisher]: got segment camera_rgb_optical_frame
[robot_state_publisher-1] [INFO] [1714261591.750343317] [robot_state_publisher]: got segment caster_back_left_link
[robot_state_publisher-1] [INFO] [1714261591.750346365] [robot_state_publisher]: got segment caster_back_right_link
[robot_state_publisher-1] [INFO] [1714261591.750349636] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-1] [INFO] [1714261591.750354982] [robot_state_publisher]: got segment wheel_left_link
[robot_state_publisher-1] [INFO] [1714261591.750360572] [robot_state_publisher]: got segment wheel_right_link
[turtlebot3_ros-3] [INFO] [1714261591.750244213] [turtlebot3_node]: Init TurtleBot3 Node Main
[turtlebot3_ros-3] [INFO] [1714261591.750407856] [turtlebot3_node]: Init DynamixelSDKWrapper
[turtlebot3_ros-3] [INFO] [1714261591.750730377] [DynamixelSDKWrapper]: Succeeded to open the port(/dev/ttyACM0)!
[turtlebot3_ros-3] [INFO] [1714261591.752523505] [DynamixelSDKWrapper]: Succeeded to change the baudrate!
[ld08_driver-2] /dev/ttyACM0    OpenCR Virtual ComPort in FS Mode
[ld08_driver-2] Can't find LDS-02
[turtlebot3_ros-3] [INFO] [1714261591.789589795] [turtlebot3_node]: Start Calibration of Gyro
[INFO] [ld08_driver-2]: process has finished cleanly [pid 3668]
[turtlebot3_ros-3] [INFO] [1714261596.789813652] [turtlebot3_node]: Calibration End
[turtlebot3_ros-3] [INFO] [1714261596.789863563] [turtlebot3_node]: Add Motors
[turtlebot3_ros-3] [INFO] [1714261596.789965840] [turtlebot3_node]: Add Wheels
[turtlebot3_ros-3] [INFO] [1714261596.789994671] [turtlebot3_node]: Add Sensors
[turtlebot3_ros-3] [INFO] [1714261596.791092689] [turtlebot3_node]: Succeeded to create battery state publisher
[turtlebot3_ros-3] [INFO] [1714261596.791519094] [turtlebot3_node]: Succeeded to create imu publisher
[turtlebot3_ros-3] [INFO] [1714261596.791970451] [turtlebot3_node]: Succeeded to create sensor state publisher
[turtlebot3_ros-3] [INFO] [1714261596.792145730] [turtlebot3_node]: Succeeded to create joint state publisher
[turtlebot3_ros-3] [INFO] [1714261596.792157844] [turtlebot3_node]: Add Devices
[turtlebot3_ros-3] [INFO] [1714261596.792165175] [turtlebot3_node]: Succeeded to create motor power server
[turtlebot3_ros-3] [INFO] [1714261596.792415848] [turtlebot3_node]: Succeeded to create reset server
[turtlebot3_ros-3] [INFO] [1714261596.792585139] [turtlebot3_node]: Succeeded to create sound server
[turtlebot3_ros-3] [INFO] [1714261596.792742047] [turtlebot3_node]: Run!
[turtlebot3_ros-3] [INFO] [1714261596.795973689] [diff_drive_controller]: Init Odometry
[turtlebot3_ros-3] [INFO] [1714261596.797464914] [diff_drive_controller]: Run!

BringupGraphTB3.png

Terminal 2

eepp@adams:~$ source scripts/keyboard_teleop.sh 

Control Your TurtleBot3!
---------------------------
Moving around:
        w
   a    s    d
        x

w/x : increase/decrease linear velocity (Burger : ~ 0.22, Waffle and Waffle Pi : ~ 0.26)
a/d : increase/decrease angular velocity (Burger : ~ 2.84, Waffle and Waffle Pi : ~ 1.82)

space key, s : force stop

CTRL-C to quit

currently:	linear velocity 0.01	 angular velocity 0.0 
currently:	linear velocity 0.02	 angular velocity 0.0 
currently:	linear velocity 0.03	 angular velocity 0.0 
currently:	linear velocity 0.04	 angular velocity 0.0 
currently:	linear velocity 0.05	 angular velocity 0.0 
currently:	linear velocity 0.060000000000000005	 angular velocity 0.0 
currently:	linear velocity 0.07	 angular velocity 0.0 
currently:	linear velocity 0.08	 angular velocity 0.0 
currently:	linear velocity 0.09	 angular velocity 0.0 
currently:	linear velocity 0.09999999999999999	 angular velocity 0.0 
currently:	linear velocity 0.10999999999999999	 angular velocity 0.0 
currently:	linear velocity 0.0	 angular velocity 0.0 
currently:	linear velocity 0.01	 angular velocity 0.0 
currently:	linear velocity 0.02	 angular velocity 0.0 
currently:	linear velocity 0.03	 angular velocity 0.0 
currently:	linear velocity 0.04	 angular velocity 0.0 
currently:	linear velocity 0.05	 angular velocity 0.0 
currently:	linear velocity 0.060000000000000005	 angular velocity 0.0 
currently:	linear velocity 0.0	 angular velocity 0.0 

I was able to change the speed and direction of the motors with the keyboard: TEST PASSED

Stretch Test

$ source scripts/make_map.sh 
[INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2024-04-27-16-55-44-535309-adams-3877
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [cartographer_node-1]: process started with pid [3878]
[INFO] [cartographer_occupancy_grid_node-2]: process started with pid [3880]
[INFO] [rviz2-3]: process started with pid [3882]
[rviz2-3] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[cartographer_node-1] [INFO] [1714262144.629386444] [cartographer logger]: I0427 16:55:44.000000  3878 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/turtlebot3_cartographer/config/turtlebot3_lds_2d.lua' for 'turtlebot3_lds_2d.lua'.
[cartographer_node-1] [INFO] [1714262144.629929368] [cartographer logger]: I0427 16:55:44.000000  3878 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/map_builder.lua' for 'map_builder.lua'.
[cartographer_node-1] [INFO] [1714262144.630124500] [cartographer logger]: I0427 16:55:44.000000  3878 configuration_file_resolver.cc:41] Found '/opt/ros/humble/share/cartographer/configuration_files/map_builder.lua' for 'map_builder.lua'.
[cartographer_node-1] [INFO] [1714262144.630300557] [cartographer logger]: I0427 16:55:44.000000  3878 configuration_file_resolver.cc:41] Found '/opt/ros/humble
  • RViz came up but robot not displayed
  • Signs of life -- a bunch of the applications started