This repo intends to simplify the installation and usage of naoqi system with ros2. This repository contains only the core packages of naoqi. For visualization with rviz, use AIResearchLab/naoqi_rviz.
git clone https://github.com/AIResearchLab/naoqi.git
Before starting the docker container, ssh into your robot and run the following commands to disable automonus behaviours
ssh nao@<robot_host>
qicli call ALAutonomousLife.setState disabled
qicli call ALMotion.wakeUp
cd src/naoqi/docker
docker compose -f compose.amd64.yaml pull
docker compose -f compose.amd64.yaml up
After working with the docker container, before shutting down the robot, ssh into your robot and run the following commands to enable automonus behaviours
ssh nao@<robot_host>
qicli call ALAutonomousLife.setState solitary
qicli call ALMotion.wakeUp
Create the workspace
mkdir -p workspace/src
cd workspace/src
Clone the repository with submodules
git clone --recursive https://github.com/AIResearchLab/naoqi.git
Clone the repository with submodules
git clone --recursive https://github.com/AIResearchLab/naoqi.git
git clone --recursive https://github.com/AIResearchLab/naoqi_rviz.git
For visalization only tasks, follow instructions at AIResearchLab/naoqi_rviz
According to ros-naoqi/naoqi_driver2 developers comments, AIResearchLab/naoqi works with both AMD64 and ARM64 computers while AIResearchLab/naoqi_rviz can only be build on AMD64 computers.
cd workspace
rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
colcon build
to agree to and skip license prompt, run,
I_AGREE_TO_NAO_MESHES_LICENSE=1 I_AGREE_TO_PEPPER_MESHES_LICENSE=1 colcon build
Before connecting with ROS, ssh into your robot and run the following commands to disable automonus behaviours
ssh nao@<robot_host>
qicli call ALAutonomousLife.setState disabled
qicli call ALMotion.wakeUp
source install/setup.bash
ros2 launch naoqi_driver naoqi_driver.launch.py nao_ip:=10.0.0.244 qi_listen_url:=tcp://0.0.0.0:0
After working with ROS, before shutting down the robot, ssh into your robot and run the following commands to enable automonus behaviours
ssh nao@<robot_host>
qicli call ALAutonomousLife.setState solitary
qicli call ALMotion.wakeUp
Check that the driver is connected:
ros2 node info /naoqi_driver
You can setup speech recognition and get one result.
ros2 action send_goal listen naoqi_bridge_msgs/action/Listen "expected: [\"hello\"]
language: \"en\""
Check that you can move the head by publishing on /joint_angles
:
ros2 topic pub --once /joint_angles naoqi_bridge_msgs/JointAnglesWithSpeed "{header: {stamp: now, frame_id: ''}, joint_names: ['HeadYaw', 'HeadPitch'], joint_angles: [0.5,0.1], speed: 0.1, relative: 0}"
You can see the published message with ros2 topic echo /joint_angles
Check that you can move the robot by publishing on cmd_vel
to make the robot move:
ros2 topic pub --once /cmd_vel geometry_msgs/Twist "linear:
x: 0.5
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.785"
Make some room around the robot!
To stop the robot, you must send a new message with linear and angular velocities set to 0:
ros2 topic pub --once /cmd_vel geometry_msgs/Twist "linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0"