Waterloo Steel:Platform Instruction - UW-Advanced-Robotics-Lab/lab-wiki GitHub Wiki

Table of Contents

[Last generated: Wed 22 Nov 2023 19:34:09 EST]


0. General:

  1. MXE 211 should auto-launch the summit-xl

0.1 Unified Development 🚧

0.2 Usage Guide With Tool Chain and Workspace:

0.3 Networking:

  1. UWARL_Robot_5G: Lab Network is a (AP:access point) wifi broadcasted by the Lab router to distribute secure networks for internet access (192.168.5.x)
  2. UWARL_17110A_5G: Robot Network Wifi is a (AP: access point) wifi broadcasted by the an on-robot router to distribute ROS network the wireless 5GHz network (192.168.1.x)
  3. (Jetson Wifi): is an isolated wifi card to allow Jetson connecting to an explicit DHCP access point
    1. The network will be isolated from the robot, only jetson will be seeing it, (unless forwarded to the local robot network through Jetson network configuration.)
    2. Use Case: logging Ground Truth data from Vicon via UDP streaming, and a ROS node on Jetson will format and broadcast the data in the local ROS network

0.3.1 Access with SSH:

Need to connect the laptop to the robot network via LAN or Wireless

# Jetson:
ssh [email protected]
# Adlink:
ssh [email protected]
# Internal-WAM PC: (if ethernet is plugged in)
ssh [email protected]

0.3.2 Access with NoMachine:

Need to connect the laptop to the robot network via LAN or Wireless

nomachine

0.3.3 External Network with Ethernet

0.3.3.a [Optional] WAN <--> Router LAN: Internet Access in Local Network

  • if you want internet access (eg, update local repository), please connect to:
    • WAN port of the robot <-----> LAN port of the Router

0.3.3.b [Optional] LAN <--> Computer: Direct Local Network Access

  1. if you want Remote access with AnyDesk to the robot network,

    • you may want your PC connecting to the Lab Wifi

    • and connect the ethernet from robot LAN to Laptop

0.3.3.c [Optional] Robot WiFi <--> Computer: Direct Local Network Access

  1. Alternatively,
    • you can connect PC to Lab Network wireless via wifi
    • and connect your PC to Global Internet (Lab Router) via ethernet cable

1. Power On Instruction:

1.1 Robot Back Panel Layout

Robotnik_back_panel

1.2 Powering on the robot

1.2.1 Turn on the robot (Main Power Switch)

  • first make sure the E-stop for Base is engaged
  • by twisting power knobs for Base
  • we should see the green button (for jetson pc) is lighting on
  • fan spinning, and everything should be powered except WAM

1.2.2 Turn on the arm (WAM Power Switch)

  • by twisting power knobs for WAM

  • Make sure the LED panel is powered on, and will show ERROR as the WAM has not been calibrated and launched by default

1.3 Use Steam Deck Controller:

1.3.1 Power on the steam deck controller

  • By default it will boot up into game controller interface,
    • if so, switch to the desktop mode
  • Prefer in sleep mode, so never turn off deck, but leave it charge and put into sleep mode (screen off)

1.3.2 Connect to the Robot Wifi UWARL_171102_5G

  • We should now be able to launch the controller

1.3.3 Launch Controller Apps

Important

⚠️ Before launching, press and release the [Summit Base E-Stop] to ensure the summit base is NOT in safety mode.

  1. Launch the joystick controller by touching [Launch UWARL Summit Controller] App Icon

📓 Icon apps are installed by uwarl-robot_config toolchain, and allow us to use the basic interface without keyboard.

deck_controller_desktop

1.3.3.a) (:one:) Joystick Controller to control Base:

deck_joystick

1.3.3.b) (:two:) Rviz Viewer:

deck_rviz

1.4 Power off Robot Sequence ‼️

⚠️ If possible, ssh into the jetson and summit PC to shutdown the PC first

# jetson:
$ ssh [email protected]
# summit:
$ ssh ssh [email protected]
  1. Long Press Green Button to power off the Jetson PC
  2. Turn off the WAM power rails
  3. Turn off the overall power rails
  4. Turn off the screen of the steam deck by pressing power button briefly once, and put into charger.
    • we dont want a reboot of steam deck

2. Adlink MXE 211 (SUMMIT + Lidar PC)

2.1 General:

  • PS4 Controller is no longer launched by default, as the rs4 node is being launched on [Steam Deck]

2.1.0 Reset Workspace:

$ rm -rf ~/UWARL_catkin_ws
$ cd_config
$ ./scripts/auto-config_UWARL_catkin_ws.zsh

2.2 Summit XL Bringup:

  1. Power on the robot, wait for computers to auto-boot

  2. Check if default launch successful:

    # SSH into adlink mxe211 (summit)
    $ ssh [email protected]
    
    # check if summit bringup is successful
    $ systemctl status --user roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch
    
    # stop/restart
    $ systemctl stop/restart --user roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch
    
    # [DEBUG]
    $ journalctl --user --user-unit=roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch > log.txt
    # [DEBUG] - Live Stream:
    $ journalctl --follow --user --user-unit=roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch

3. Jetson Orin (WAM + Vision PC)

3.1 WAM Node:

# launch wam node:
$ roslaunch wam_node wam_node.launch

# example commands:
$ rosservice call /wam/go_home                                                                         
$ rosservice call /wam/joint_move "joints:                                                            
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0"

3.2 Multiple Intel Cameras:

$ ssh [email protected]
$ roslaunch waterloo_steel_supervisor multi_intel_camera.launch

4. Internal WAM PC

In order to connect over the Inernal WAM PC (to check if the WAM, under Real-time operation, is performing correctly), download the wamdiscover.py from the Barrett file repository. This will give you the current WAM-IP and allow you to connect to it directly.

Useful info on setting up programs to use the libbarrette library can be foundhere.

5. Steam Deck Controller

5.1 Deck Button Layout

steam_deck_ports_controls

5.2 Deck Button Functions

5.2.a) Move Summit:

  • Launch the joystick controller by touching [Launch UWARL Summit Controller] App Icon
  • Button Layouts:
    • Hold 3️⃣ [R1] + Move Up/Down 1️⃣ [L3] : Forward/Reverse
    • Hold 3️⃣ [R1] + Move Left/Right 2️⃣ [R3] : CCW/CW
    • Hold 3️⃣ [R1] + Press (11) [Options] : Omni / Skid Mode
    • Hold 3️⃣ [R1] + Press [Y] Speed Up ++
    • Hold 3️⃣ [R1] + Press [A] Speed Down --
    • Hold 3️⃣ [R1] + Press [X/B] 🚫 NOT IMPLEMENTED

5.2.b) Steam Arch Linux:

  • 4️⃣ [R4] : Scroll Up
  • 5️⃣ [R5] : Scroll Down
  • 6️⃣ [L5] : Left Mouse Click for Mouse Menus
  • 7️⃣ [L4] : Enter
  • 8️⃣ [Left Trackpad] Button Click : Arrow Key Up/Down/Left/Right
  • 9️⃣ [Right Trackpad] : Mouse Move + Mouse Right Click
  • 🔟 [Steam] : Menu Selection ---> Used to switch between Steam OS / ArchLinux Mode + Power/Restart

5.2.c) Additional & Modification:

  • You may check the button id using the software GUI: joystick
  • You may assign these button id to summit ws files on summit-pc: ~/UWARL_catkin_ws/waterloo_steel/waterloo_steel_interface/summit_xl_pad/config/uwarl_deck.yaml

5.3 Control Summit Base Platform:

deck_controller_desktop

5.3.1 Launching through Icons:

  • 1️⃣ > Launch Pad
  • 2️⃣ > Rviz Viewer

5.3.2 Launch through terminals:

5.3.2.1 Launch Pad

$ roslaunch summit_xl_pad waterloo_steel_summit_deck.launch

5.3.2.2 Launch Rviz

$ rosrun rviz rviz

6. AMCL Mapping Instruction

Important

  1. Before launching, make sure the robot is aligned with an edge of the wall in the center of the room for best result
  2. Make sure in slow speed when creating the map

6.1 Creating AMCL Map:

6.1.1 Disable Navigation Package

## comment out navigation for summit
$ sudo vim ~/UWARL_catkin_ws/src/uwarl-summit_xl_robot/waterloo_steel_summit_bringup/launch/waterloo_steel_summit.launch
## As below:
# <!-- include file="$(find summit_xl_navigation)/launch/summit_xls_navigation.launch" >
#   <arg name="id_robot"
#   value="$(arg id_robot)"/>
# </include -->
## restart summit roscore:
$ summit_systemctl restart
## to see if the summit core launched successfully, see journal logs as:
$ summit_systemctl follow

6.1.2 Launch SLAM Gmapping:

## slam mapping:
$ cd ~/UWARL_catkin_ws/src/uwarl-summit_xl_robot/waterloo_steel_summit_bringup
$ roslaunch summit_xl_localization slam_gmapping.launch

6.1.3 Now Mapping on Rviz:

mapping_rviz

  • Now, you may leash the robot slowly across the room from edge to edge.

Important

  1. Keep a distance of at least 0.5 meters between the robot and the objects you want to capture. Objects within this distance will not be captured.
  2. Make sure your legs are not captured as an object. Therefore, stay in the blind spot of the robot or keep walking around.

6.1.4 Save the Map:

$ cd ~/UWARL_catkin_ws/src/uwarl-summit_xl_common/summit_xl_localization/maps/{Building-floor-folder}
## Before kill slam_gmapping.launch, save the final map as:
$ rosrun map_server map_saver -f {map_name_date}

## Example: 
$ cd ~/UWARL_catkin_ws/src/uwarl-summit_xl_common/summit_xl_localization/maps/UW_E7_1ST
$ rosrun map_server map_saver -f map_robothub_2023-11-08

6.2 Loading the New Map

$ cp ~/UWARL_catkin_ws/src/uwarl-summit_xl_common/summit_xl_localization/maps/UW_E7_1ST/map_robothub_2023-11-08.pgm ~/UWARL_catkin_ws/src/uwarl-summit_xl_common/summit_xl_localization/maps/map_in_use/map.pgm 
$ cp ~/UWARL_catkin_ws/src/uwarl-summit_xl_common/summit_xl_localization/maps/UW_E7_1ST/map_robothub_2023-11-08.yaml ~/UWARL_catkin_ws/src/uwarl-summit_xl_common/summit_xl_localization/maps/map_in_use/map.yaml 
## Modify Map In Use:
$ vim ~/UWARL_catkin_ws/src/uwarl-summit_xl_common/summit_xl_localization/maps/map_in_use/map.yaml 
## so that it is targeting map.pgm

⚠️ I think this can be automated in robot env, or config tools. Someone makes it :P -- Jack


Appendix A - Utilities

A.1 xacro and launching

[TODO]

A.2 ROS

A.2.1 ROS Testing

$ rosnode ping -c 4 rosout
rosnode: node is [/rosout]
pinging /rosout with a timeout of 3.0s
xmlrpc reply from http://ann:46635/     time=1.195908ms
xmlrpc reply from http://ann:46635/     time=1.123905ms
xmlrpc reply from http://ann:46635/     time=1.144886ms
xmlrpc reply from http://ann:46635/     time=1.137018ms
ping average: 1.150429ms

A.2.2 ROS Profiling

a) GDB:

$ build_ws -DCMAKE_BUILD_TYPE=Debug

# in roslaunch file:
<launch>
  <node name="wam_node" type="wam_node" pkg="wam_node" output="screen" 
    launch-prefix="gdb -ex run --args"
  />
</launch>

b) Valgrind:

  • Install:

    • $ sudo apt -y install valgrind
      $ sudo apt-get install kcachegrind # visualizer:
      
      #### roslaunch file add prefix:
      <launch>
        <node name="wam_node" type="wam_node" pkg="wam_node" output="screen" 
          launch-prefix="valgrind --tool=callgrind  
            --log-file=/home/uwarl-orin/JX_Logs/valgrind.log 
            --callgrind-out-file='/home/uwarl-orin/JX_Logs/callgrind.wam_node.%p'"
        />
      </launch>
  • Instructions:

    • $ build_ws -DCMAKE_BUILD_TYPE=Debug
      
      # enable core dumps:
      $ ulimit -a	# check limits
      $ ulimit -c unlimited  # unlimited
      
      # allow core dumps to be created:
      $ sudo echo 1 > /proc/sys/kernel/core_uses_pid

A.2.3 ROS Profiling with rosrun:

Instructions:

  • # make sure build with debug:
    $ build_ws -DCMAKE_BUILD_TYPE=Debug
    # OR:
    $ build_ws_debug
    
    # normal program run:
    $ rosrun vins vins_node $cam_config_file_path
    
    # run with valgrind:
    $ rosrun_valgrind vins vins_node $cam_config_file_path
    
    # -> check error causing memory dump:
    $ cat $HOME/valgrind_log.txt
    ##### OUTPUT:
    ==134393== Memcheck, a memory error detector
    ==134393== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
    ==134393== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
    ==134393== Command: /home/parallels/UWARL_catkin_ws/devel/lib/vins/vins_node /home/parallels/UWARL_catkin_ws/src/vins-research-pkg/VINS-Fusion/config/uwarl_d455/mono_rgb_imu_config_dual.yaml
    ==134393== Parent PID: 134030
    ==134393==
    ==134393== Thread 7:
    ==134393== Invalid read of size 8
    ==134393==    at 0x4936B20: shared_count (shared_count.hpp:433)
    ==134393==    by 0x4936B20: shared_ptr (shared_ptr.hpp:422)
    ==134393==    by 0x4936B20: FeatureTracker::trackImage(double, cv::Mat const&, cv::Mat const&) (feature_tracker.cpp:199)
    ==134393==    by 0x48B184B: Estimator::inputImage(double, cv::Mat const&, cv::Mat const&) (estimator.cpp:167)
    ==134393==    by 0x19BCAB: sync_process() (rosNodeTest.cpp:126)
    ==134393==    by 0x56B2FAB: ??? (in /usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.28)
    ==134393==    by 0x4E72623: start_thread (pthread_create.c:477)
    ==134393==    by 0x596B49B: thread_start (clone.S:78)
    ==134393==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
    ==134393==
  • # options:
    $ rosrun_gdb
    $ rosrun_valgrind

Appendic B - Troubleshoot:

B.1 Error of catkin build:

B.1.1 Unable to find source space ....

rm -rf ~/.catkin_tools

B.2 Hardware

B.2.1 Deck Controller Cannot Launch:

🚨 If the controller app quit after launching, it is likely due to the following issues:

  1. The deck is not connected to summit wifi "UWARL_171102A_5G"

    🛠️ Connect to the wifi manually at the status bar

  2. The summit is not hardware ready:

    🛠️ Please reset (engage and release) the E-Stop at the rear of the SUMMIT base

  3. There is no ros core in the network OR any other detailed issues → The Summit Base ROS Controller and ROS Core were not launched successfully nor enabled:

    🛠️ Please SSH into the summit base and troubleshoot from there:

    # SSH into adlink mxe211 (summit)
    $ ssh [email protected]
    
    # check if summit bringup is successful
    $ systemctl status --user roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch
    
    # [DEBUG] - print out last msg (double-check time-stamp):
    $ journalctl --follow --user --user-unit=roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch.service > log.txt
    # [DEBUG] - Live Stream:
    $ journalctl --follow --user --user-unit=roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch.service
    
    # stop/restart
    $ systemctl stop --user roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch
    $ systemctl restart --user roscorelaunch@waterloo_steel_summit_bringup:waterloo_steel_summit.launch
    
    # You may want to check if the workspace is at the right target, and built successfully:
    $ check_ws_status
    $ build_ws
    $ src_all

C. System Architecture:

Hardware Architecture Diagram V3 Final


> Back To Top <

⚠️ **GitHub.com Fallback** ⚠️