NAO Tutorial: Getting Started with NAO + ROS

NAO setup with ROS 🤖

This tutorial shows how to work with Physical NAO.

Make sure you have installed all the dependencies and configured PYTHONPATH system variable correctly

*see installation guide for detail

Controlling Robot

  1. Turn on the robot. See this guide for detail
  2. Start the robot bridge on your computer

    $ roslaunch nao_bringup nao_full_py.launch nao_ip:=<robot_ip> \
    roscore_ip:=<roscore_ip>
    

    This will start the robot’s default configuration with the following publisher:

    • joint_states
    • tf
    • top camera
    • bottom camera
    • left sonar
    • right sonar
    • microphone
  3. To visualize the robot, open rviz

    $ rosrun rviz rviz
    
    1. In top bar, go to File->Open Config
    2. navigate to <your catkin workspace>/src/nao_robot/nao_description/config and open the file with .rviz extension
    3. you should see something similar to the below screenshot NAO rviz
  4. Controlling the robot

    1. execute rosnode list to check if /nao_walker node is running
    2. To turn on the motors

      $ rosservice call /body_stiffness/enable "{}"
      

      To turn off the motors

      $ rosservice call /body_stiffness/disable "{}"
      
    3. once the motors are on, use the following command to move the robot in x-direction

      $ rostopic pub -1 /cmd_vel geometry_msgs/Twist \
      '{linear: {x: 1.0, y: 0.0, z: 0.0}, \
      angular: {x: 0.0, y: 0.0, z: 0.0}}'
      

      To stop the robot, run:

      $ rostopic pub -1 /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}}'
      

Next: NAOqi SDK Guide

Reference

Avatar
Zijian Hu
Undergraduate Student

My research interests include computer vision, machine/deep learning, and robotics.

Related