This repository contains the implementation of Dynamic Modelling of NAO robot and imitation of the human actor wearing Xsens suit. Note that the work has been tested in NAO v5 H25 robot with Xsens Analyze on MAC OS Big Sur in M1 Macbook Pro.
Requirements | Version |
---|---|
Python | 2.7 or Python3 |
Cmake | 3.0.2 |
qibuild | 3.14.1 |
NAOqi C++ SDK | 2.5.7 |
Eigen (already imported) | 3.9.x |
qpOASES (already imported) | 3.2.0 |
Make Generator | Unix Generator |
Xsens | Analyse |
Copellia Simulator | 4.1.0 |
Choreographe Suite | 2.1.4 |
- Install CMake, Python, Unix Generator, Copellia Simulator and Choreographe Suite
- Install NAO C++ SDK
- Initialize Worktree
- Configure and Build
- Execute and Run
Start by cloning the repository,
git clone <git repo id>
NAO C++ SDK procedure is installed with the same procedure as of,
- The
config.cmake
of NAO SDK has to be changed to
set(CMAKE_CXX_FLAGS "-stdlib=libc++" CACHE INTERNAL "" FORCE)
set(CMAKE_CXX_COMPILER /usr/bin/g++ CACHE INTERNAL "" FORCE)
set(CMAKE_C_COMPILER /usr/bin/gcc CACHE INTERNAL "" FORCE)
CMake and Unix Make Generator are installed using brew
command
brew install cmake make
Python3 should be the default python version as in the time of creating the repository. One can also installed custom python version using brew
as
brew install python
Note: But the python version used here is 3.7 instead of 2.7. To ensure everything is working, the installation is tested in
virtualenv
. It can also be installed systemwide too.
Install latest version or the preferred version of Copellia simulator from https://www.coppeliarobotics.com/downloads
.
In Mac, the installer is not the desirable one. So, the choreographe-suite is installed from the binary version.
If there are any dynamic linker dependency errors, the additional tools listed below can come in handy.
Use the below license key. Its available for all robotics users and multi-machine users.
654e-4564-153c-6518-2f44-7562-206e-4c60-5f47-5f45
To initialize the worktree, please run the instruction from belo,
https://developer.softbankrobotics.com/nao6/naoqi-developer-guide/creating-application/creating-new-application-outside-choregraphe-using
In WorkTree directory, assuming the qibuild config
and qitoolchain
has been properly configured, run
qibuild configure --release
qibuild make
If you are using your MAC, you need to set the DYLD_LIBRARY_PATH
to help the executable looking for dynamic shared libraries created during build.
For example,
export DYLD_LIBRARY_PATH=/path/to/NAO-worktree/nao_dynamics_imitation/build-nao-config/sdk/lib
You need to be in bin
folder of your build
directory to run the executable that has been created.
To run the imitation in real robot, run
./nao_dynamics_imitation XSENS_IP XSENS_PORT ROBOT_IP ROBOT_PORT ROBOT_SPEED MODE
To test the simulation in Vrep, follow the procedure below
- Start CopelliaSim and open the scene
NAO.ttt
. - The default IP and port for CopelliaSim External API is
127.0.0.1
and19999
. - Now to start the Naoqi server, in
choreographe-suite/bin
and run
./naoqi-bin -p 9559 &
- The default IP and port for NAOqi server and the simulation robot is
127.0.0.1
and9559
. - Now everything is setup, in
choreographe-suite
, run./choreographe
and connect to the simulated robot. - If you are using your MAC, you need to set the
DYLD_LIBRARY_PATH
to help the executable looking for dynamic shared libraries created during build.
For example,
export DYLD_LIBRARY_PATH=/path/to/NAO-worktree/nao_dynamics_imitation/build-nao-config/sdk/lib
- You need to be in
bin
folder of yourbuild
directory to run the executable that has been created. Finally, run to test the Copellia simulation.
./vrep_simulation_test
or run the imitation problem in simulation with
./nao_dynamics_imitation_sim XSENS_IP XSENS_PORT VREP_IP VREP_PORT ROBOT_IP ROBOT_PORT ROBOT_SPEED MODE
These are some of the important tools that come in handy during the testing
- install_name_tool
- otool