Aelos Docs

Q&A

  • Reinstalling the environment

The corresponding development and runtime environments are pre-installed when the machine leaves the factory. If the host's runtime environment gets damaged during use, there are two ways to restore it. Note: please save your code regularly and promptly, as previously edited code may be lost once the environment is damaged.

  1. Use the official Clonezilla image to directly restore the system to its factory state
  2. Use the environment reinstallation method below to reinstall the environment
  • Installing the dependency environment

    1. Install the third-party dependency libraries: sudo apt-get install liblcm-dev libgflags-dev libgoogle-glog-dev liblmdb-dev. If you encounter network problems, you can replace the sources with the accelerated mirror from Tsinghua University: https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/.

    2. drake

    Follow the official documentation. The software version we release requires installing drake version 1.19.0-1 specifically.

    # ..先根据官方文档配置好 apt 源
    sudo apt install drake-dev=1.19.0-1

    Note that the last step requires adding the drake installation path to the PATH environment variable. You can configure it in ~/.bashrc or ~/.zshrc depending on the terminal type you use.

    1. Install the mpc dependency cassie_alip_mpc

    Refer to the "Build Install Casadi by Source and Install" section in https://github.com/UMich-BipedLab/cassie_alip_mpc for installation.

    3.1 clone: git clone https://github.com/UMich-BipedLab/cassie_alip_mpc.git

    3.2 Run the following commands

    cd external_packages/casadi
    
    sudo apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config --install-recommends
    
    mkdir build
    cd build
    
    cmake ..
    
    sudo make install
    
  • Compilation error: lcm cannot be found, findpackage() fails to find it

    Cause: the lcm library may not be installed correctly.

    Solution: make sure the lcm library has been installed according to the following procedure.

    # 安装一些依赖
    sudo apt install build-essential libglib2.0-dev cmake default-jdk python-all-dev liblua5.1-dev golang doxygen
    
    # 克隆仓库并编译安装
    git clone https://github.com/lcm-proj/lcm.git
    cd lcm/ && mkdir bulid && cd build
    cmake .. && make -j8
    sudo make install
    
  • Compilation error: some lcm modules cannot be found, while findpackage() can find lcm

    Alt text

    Error message:

    Target "kuavocontroller" links to target "Lcm::lcm-coretypes" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Target "kuavoController" links to target "lcm::lcn" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target,or an ALIAS target is missing?

    Cause: drake also ships with an lcm. This may be caused by an incorrect drake version, or the drake environment variables not being configured in the terminal environment.

    Solution:

    1. Confirm that the correct drake version is installed: sudo apt install drake-dev=1.19.0-1
    2. Confirm that the environment variables are configured according to the official tutorial Note the last step: depending on the terminal type you use (commonly the bash or zsh terminal), put the following content into the corresponding configuration file, e.g., for the bash terminal put it in ~/.bashrc, and for the zsh terminal put it in ~/.zshrc
    export PATH="/opt/drake/bin${PATH:+:${PATH}}"
    export PYTHONPATH="/opt/drake/lib/python$(python3 -c 'import sys; print("{0}.{1}".format(*sys.version_info))')/site-packages${PYTHONPATH:+:${PYTHONPATH}}"
    1. Open a new terminal or source the corresponding configuration file, clear the build directory of the kuavo repository, then recompile
  • libmodbus.so not found during compilation

    • Alt text
    • The modbus library needs to be installed: sudo apt install libmodbus-dev
  • Frequent imu read timeouts, or Ecmaster communication timeouts

    • Possible causes: loose imu, loose motor communication cables, low battery level

    • Solutions:

      • Check whether the imu and driver connections are normal (all indicator lights normal)
      • Check the battery level (both the left and right batteries need to be above 60V)
  • Errors like Scan bus mismatch for the first slave on bus at startup

    • ecmaster_error1
    • Possible cause: abnormal communication between the host and the first driver
    • Solution: check whether the indicator lights on the Ethernet ports are on, and that the connection between the nuc and the first driver is not loose
  • Errors like Slave mismatch after xxx, Auto-inc Address 0xfff3, port 1 at startup

    • Alt text
    • Possible cause: the actual number of motors on the robot does not match the number of motors in the configuration file. This may be caused by an incorrect robot version, or a cable between drivers falling off, resulting in an incorrect driver count
    • Solutions:
      • Use echo $ROBOT_VERSION to print and check the current robot version, and check whether the number of motors in the corresponding configuration file matches the actual one. If not, set the correct version and recompile the program
      • If the counts match, check whether the connections after the xxx-th driver reported in the error are normal
  • Errors like LinkOsCreateContext(): open device '/dev/atemsys' failed! at startup

    • Alt text
    • Possible cause: the kernel module atemsys is not correctly auto-mounted, or access is denied
    • Solutions:
      • The program must be executed with sudo when interacting with hardware, or run as the root user; otherwise it will fail to start
      • If errors persist when running with sudo, the kernel module may be abnormal
        • Check whether the kernel module is correctly loaded: lsmod | grep atemsys
        • If it is not loaded successfully, try loading it manually with sudo modprobe atemsys
        • If errors persist, check whether the kernel version is correct with uname -r. It should normally be 5.15.94-rt59. If not, you need to enter the grub menu at boot and switch to this kernel version
        • If the corresponding kernel version is no longer in the grub list (only the image we provide with the specified kernel contains this kernel module), please re-flash the nuc image, or contact after-sales personnel to provide the kernel module again for installation
  • During runtime or motor enabling, the terminal reports an error that motor xxx is absent

    • Alt text

    • Possible cause: an abnormal connection between two drivers in the middle of the chain, which may be a loose harness or a damaged driver in the middle (if the error reports that driver No. N is offline, the connection between that driver and the previous one is abnormal).

    • Solution: check whether the cables between the drivers are normal. You can wiggle the cables after enabling to see whether the connection is stable

  • Weak robot feedback, many (1ms) timeouts in the log

    • Note that 12th-generation NUCs need all E-cores disabled; otherwise NUC performance will be degraded, affecting computation time (nuc units shipped from the factory should come pre-configured with E-cores disabled)
    • Verify with htop: after the E-cores are properly disabled on a 12th-generation nuc, there will be only 8 cores; if not disabled, there will be 16 cores, in which case you need to enter the BIOS settings
    • alt text

Robot Startup

To start the kuavo program, refer to the documentation: https://www.lejuhub.com/highlydynamic/kuavo_opensource/-/blob/dev/docs/base_useage.md

To start the kuavo-ros-control program, refer to the documentation: https://www.lejuhub.com/highlydynamic/craic_code_repo/-/blob/dev/readme.md

Notes:

  • kuavo-ros-control must be compiled and run according to the open-source options described in the documentation.

VR Startup Settings

Reference documents:

Simulation Development Settings

KUAVO

The simulation currently used by kuavo is based on drake, while the visualization is based on rviz.

KUAVO-ROS-CONTROL

The simulation used by kuavo-ros-control is based on mujoco, while the visualization is based on rviz. When not running on a real robot, the kuavo-ros-control robot program automatically starts the simulation and visualization.

Notes:

  • The kuavo drake simulation does not support controlling finger and head joints; if you need to control finger and head joints, you must use the physical robot.
  • When controlling the robot's joint motors, the robotModel in kuavo's rviz visualization does not update, while kuavo-ros-control's does.

Individually Controlling KUAVO's Upper and Lower Limb Joint Motors

The upper body now has a total of 28 controllable motors:

  • 14 arm joints
  • 12 finger joints
  • 2 head joints

Arm joint names:

left_arm_joint_names = [
    "l_arm_pitch",
    "l_arm_roll",
    "l_arm_yaw",
    "l_forearm_pitch",
    "l_hand_yaw",
    "l_hand_pitch",
    "l_hand_roll",
],
right_arm_joint_names = [
    "r_arm_pitch",
    "r_arm_roll",
    "r_arm_yaw",
    "r_forearm_pitch",
    "r_hand_yaw",
    "r_hand_pitch",
    "r_hand_roll",
]

Finger joint names:

left_hand_joint_names = [
    "l_thumb_proximal_yaw",
    "l_thumb_distal_pitch",
    "l_index_proximal_finger",
    "l_middle_proximal_finger",
    "l_ring_proximal_finger",
    "l_pinky_proximal_finger",
],

right_hand_joint_names = [
    "r_thumb_proximal_yaw",
    "r_thumb_distal_pitch",
    "r_index_proximal_finger",
    "r_middle_proximal_finger",
    "r_ring_proximal_finger",
    "r_pinky_proximal_finger",
]

Head joint names:

head_joint_names = [
    "head_yaw",
    "head_pitch",
]

Controlling joint motors:

Arm control API documentation: https://www.lejuhub.com/highlydynamic/kuavo_opensource/-/blob/dev/docs/ros_interfaces/sub_topics.md#kuavo_arm_traj

Finger control API documentation: https://www.lejuhub.com/highlydynamic/kuavo_opensource/-/blob/dev/docs/ros_interfaces/sub_topics.md#control_robot_hand_position

Head control API documentation: https://www.lejuhub.com/highlydynamic/kuavo_opensource/-/blob/dev/docs/ros_interfaces/sub_topics.md#robot_head_motion_data

Reading joint motor states:

Arm joint state reading API documentation: https://www.lejuhub.com/highlydynamic/kuavo_opensource/-/blob/dev/docs/ros_interfaces/pub_topics.md#robot_arm_q_v_tau

Finger state reading API documentation: https://www.lejuhub.com/highlydynamic/kuavo_opensource/-/blob/dev/docs/ros_interfaces/pub_topics.md#robot_hand_position

Head state reading API documentation: https://www.lejuhub.com/highlydynamic/kuavo_opensource/-/blob/dev/docs/ros_interfaces/pub_topics.md#robot_head_motor_position

The lower limbs do not support controlling an individual motor. There are currently two ways to control the lower limbs:

Notes:

  • The joint units differ between the sending and reading APIs; please follow the API documentation when sending joint values.

How to Use the Robot's Head Camera and Call the APIs?

The camera is connected to and runs on the NUC in the robot's head. When in use, the head NUC serves as the host computer. The included packages can be found in the kuavo_ros_application repository. You can read the repository README or the package documentation to learn about the host computer development environment, the ROS master-slave configuration, and package usage.

You can read the following documents to learn how to use the corresponding packages and development examples:

Notes

  • The host computer usually already has the base environment required by the packages. If you encounter environment issues, please follow the environment installation documents above to resolve them yourself;
  • Camera-related packages must run on the head NUC host computer; when using them, please make sure the ROS master-slave environment is properly configured with the torso NUC.

How to Make the Robot Walk to a Target Point and Grasp an Object?

The robot needs to walk from point A to point B, then use the vision camera as the input signal to control the hands to perform the object grasping motion.

You can control the robot's motion by sending the robot's x, y axis velocities and yaw angular velocity to the walkCommand topic. See the documentation for topic details.

  • You can attach an Apriltag at point B. Once the camera recognizes the tag's position relative to the robot, use the walkCommand topic to control the robot to reach point B. The drawback is that you need to make sure the camera can recognize the tag at point B while at point A.

  • Or, if point B is defined relative to point A (e.g., 2 m directly in front of A), you can generate a path represented by nav_msgs/Path or Point, and use a PID or MPC control algorithm to drive the robot along the trajectory to point B via the walkCommand topic.

  • Or, if your robot is equipped with lidar navigation, you can also set the lidar start point and target point to have the robot navigate to point B. For the lidar navigation feature, you can read the documentation.

You can control arm motion and dexterous hand grasping respectively via the kuavo_arm_traj topic and the control_end_hand service. For topic/service details, see the subscription topics documentation and the services documentation.

  • You can refer to the example and the documentation, use visual features to recognize the object's position relative to the torso, apply inverse kinematics to obtain the end-effector joint values at the grasping position, and move the arm to that point to complete the grasping.

  • You can refer to the example, attach an Apriltag to a flat spot on the object's surface (e.g., a bottle cap), then recognize the tag's position relative to the robot's torso via the camera, apply inverse kinematics to obtain the end-effector joint values at the grasping position, and move the arm to that point to complete the grasping.

  • You can also use methods such as Bezier curve interpolation and cubic spline interpolation to optimize and generate smoother arm motion trajectories.

For more about Kuavo's ROS topics and services, see the topics documentation.