Skip to content

Set up Machine for running HDE

Lorenzo Rapetti edited this page Feb 11, 2022 · 8 revisions

This page describes the step to prepare a computer for running the software required for running Human Dynamic Estimation. N.B.: in order to have a complete installation of all the components it is required a Windows machine.

The computer will be able to:

  • Control the Xsens suit (only Windows)
  • Read data from FTShoes/FTSkShoes
  • Process the data (HDE)
  • Visualize the data

The overall software infrastructure is shown in the following diagram: HDEv2 infrastructure

The more relevant required piece of software are the following, and the way to install them is described below:

the installation procedure uses the Robotology Superbuild, so it is strongly suggested to take a look at the robotology-superbuild installation guidelines which may be more updated.

Dependencies

Robotology

The robotology software depends on several libraries as documented in robotology-superbuild\system-libraries.

Xsens (only for Windows)

In order to run Xsens related software (used in wearables), it is required to have installed the xsens MVN SDK 2018.0.3 library provided by Xsens (https://www.xsens.com), a copy of the driver is stored at \\storage05.icub.iit.local\repository\common\drivers_and_software\xsens. Once the SDK is installed, it is required to add to the Path the following directories (N.B the prefix of the following path can change depending on the version and the installation path chosen.):

Environment Variables
Path c:\Program Files\Xsens\MVN SDK 2018.0.3\SDK Files\rundeps
c:\Program Files\Xsens\MVN SDK 2018.0.3\SDK Files\x64\lib\run
c:\Program Files\Xsens\MVN SDK 2018.0.3\SDK Files\x64\lib\dev
c:\Program Files\Xsens\MVN SDK 2018.0.3\SDK Files\x64\include
c:\Program Files\Xsens\MVN SDK 2018.0.3\SDK Files\x64\lib

USB-CAN 2

Create a directory for storing the USB-CAN 2 interface drivers:

cd $DEV
mkdir thirdPartyPrograms
cd thirdPartyPrograms
mkdir CAN_driver
cd CAN_driver
  • Before proceeding, check if you have the availability of the proper drivers from the ESD electronic that are shipped with the can-usb2 device. You should have the following two files:

    • CAN_SDK_V620 (the version could be different)
    • can_usb2_win64_269 (the version could be different)
  • Store the files under CAN_driver directory. Run the application CAN_SDK_V620 to install CAN SDK for windows.

  • Connect the CAN-USB 2 interface device with the cable to the laptop. Open the Windows Device Manager application and select the unknown device. Select to update the driver and select can_usb2_win64_269 directory. • USB-CAN should now be recognized and it will appear on Windows Device Manager application. Verify if the CAN is correctly identified in the Window Device Manager.

  • Add following value to Path environment variable: C:\Program Files\ESD\CAN\SDK\lib

ROS

Linux

It can be installed by following the official guidelines at http://wiki.ros.org/ROS/Installation.

Windows

ROS can be installed on Windows by following the ROSOnWindows guidelines.

Once the installation is completed, there may be conflicts between dependency libraries installed for YARP (e.g. with vcpkg) and those installed by ROS (ROS installts its own dependencies), so it is necessary to sanitize the Path when using ros. One way to avoid this may be to use ROS libraries for YARP (as described in https://github.com/robotology/robotology-superbuild/issues/128#issuecomment-451023509), otherwise the following solution is:

  • create a ROS initialization script that removes qt5 from the Path (up to now qt5 is the only confilct that has been observed), and initialize ROS (avoid executing the ROS setup script c:\opt\ros\melodic\x64\setup.bat) every time. The content of the .bat file is:
    call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=amd64 - 
    host_arch=amd64
    set path=%path:C:\Program Files\robotology\Qt-5.11.1_v14_x86_amd64\bin;=%
    call "C:\opt\ros\melodic\x64\setup.bat"
    
  • created a shortcut (e.g. in the Desktop) similary to what described in ROSOnWindows guidelines, but with the following target: C:\Windows\System32\cmd.exe /k "C:\Users\icub\dev\ros\setup\ROS-configure.bat. This shortcut will then open a Visual Studio Command Propmpt in which execute ROS Commands.

(the paths used in the above guidelines can change with a different configuration)

For more information on how to use YARP with ROS check yarp_with_ros

Installation

robotology-superbuild

(Refer to robotology-superbuild for more details)

  • clone:

    cd $dev
    git clone https://github.com/robotology/robotology-superbuild.git
    cd robotology-superbuild
    mkdir build
    
  • configure the following CMake variables and then generate (via CMake GUI or terminal):

    CMake Variables
    SOURCE CODE: $DEV/robotology-superbuild
    BUILD IN: $DEV/robotology-superbuild/build
    ROBOTOLOGY_ENABLE_DYNAMICS true
    ROBOTOLOGY_USES_XSENS_MVN_SDK true
    CMAKE_INSTALL_PREFIX $DEV/robotology-superbuild/build/install
  • build:

    • unix
    cd build
    make install
    
    • windows
    cd build
    cmake --build . --config Release --target INSTALL
    
  • Add Enviornment Variables

    Environment Variables
    ROBOTOLOGY_SUPERBUILD_ROOT $DEV\robotology-superbuild
    ROBOTOLOGY_SUPERBUILD_INSTALL_PREFIX $DEV\robotology-superbuild\build\install
    Path $DEV\robotology-superbuild\build\install\bin
    $DEV\robotology-superbuild\build\install\lib
    YARP_DATA_DIRS $DEV\robotology-superbuild\build\install\share\yarp
    $DEV\robotology-superbuild\build\install\share\iCub
    $DEV\robotology-superbuild\build\install\share\ICUBcontrib
    $DEV\robotology-superbuild\robotology\icub-tests\suits

    (Those variables can be directly set by using source $ROBOTOLOGY_SUPERBUILD_INSTALL_PREFIX/share/robotology-superbuild/setup.sh in Linux, or the PowerShell script robotology-superbuild/build/install/share/robotology-superbuild/addPathsToUserEnvVariables.ps1 in Windows)

icub-firmware-shared

(Refer to icub-firmware-shared for more details)

  • clone:

    cd $DEV
    git clone https://github.com/robotology/icub-firmware-shared.git
    cd icub-firmware-shared
    mkdir build
    
  • configure the following CMake variables and then generate (via CMake GUI or terminal):

    CMake Variables
    SOURCE CODE: $DEV/icub-firmware-shared
    BUILD IN: $DEV/icub-firmware-shared/build
  • build:

    • unix
    cd build
    make install
    
    • windows
    cd build
    cmake --build . --config Release --target INSTALL
    

icub-main

(Refer to icub-main for more details) The icub-main software is compiled by the robotology-superbuild. However, it is required to recompile it after changing some of its CMake options in order to have the whole HDE software running:

  • configure the following CMake variables and then generate (via CMake GUI or terminal):

    CMake Variables
    SOURCE CODE: $DEV/robotology-superbuild/robotology/ICUB
    BUILD IN: $DEV/robotology-superbuild/build/robotology/ICUB
    ENABLE_icubmod_ecan true
    ENABLE_icubmod_canBusAnalogSensor true
    ENABLE_icubmod_embObjFTsensor true
    ENABLE_icubmod_gazecontrollerclient true
    ENABLE_icubmod_cartesiancontrollerclient true
    ENABLE_icubmod_cartesiancontrollerserver true
    ENABLE_icubmod_canBusSkin true
    ENABLE_icubmod_skinWrapper true
    ICUB_USE_icub_firmware_shared true
    icub_firmware_shared_DIR $DEV/icub_firmware_shared/build
    CMAKE_INSTALL_PREFIX $DEV/robotology-superbuild/build/install
    ESDCANAPI_LIB path-to-ntcan.lib/ntcal.a (e.g. C:/ProgramFiles/ESD/CAN/SDK/lib/VC/amd64/ntcan.lib in Windows)
  • build:

    • unix
    cd build
    make install
    
    • windows
    cd build
    cmake --build . --config Release --target INSTALL
    

forcetorque-yarp-devices

(Refer to forcetorque-yarp-devices for more details)

  • clone:

    cd $DEV
    git clone https://github.com/robotology-playground/forcetorque-yarp-devices.git
    cd forcetorque-yarp-devices
    mkdir build
    
  • configure the following CMake variables and then generate (via CMake GUI or terminal):

    CMake Variables
    SOURCE CODE: $DEV/forcetorque-yarp-devices
    BUILD IN: $DEV/forcetorque-yarp-devices/build
    CMAKE_INSTALL_PREFIX $DEV/robotology-superbuild/build/install
    ENABLE_ftshoe true
  • build:

    • unix
    cd build
    make install
    
    • windows
    cd build
    cmake --build . --config Release --target INSTALL
    

wearables

(Refer to wearables for more details)

  • clone:

    cd $DEV
    git clone https://github.com/robotology-playground/wearables.git
    cd wearables
    mkdir build
    

    (N.B. the human-dynamics-estimation software is under development and the stable branch for running the full HDE may change)

  • configure the following CMake variables and then generate (via CMake GUI or terminal):

    CMake Variables
    SOURCE CODE: $DEV/wearables
    BUILD IN: $DEV/wearables/build
    CMAKE_INSTALL_PREFIX $DEV/robotology-superbuild/build/install
    Xsens_INCLUDE_DIR (Only for Windows) C:/Program Files/Xsens/MVN SDK 2018.0.3/SDK Files/x64/include
    Xsens_xme_LIBRARY (Only for Windows) C:/Program Files/Xsens/MVN SDK 2018.0.3/SDK Files/x64/lib/xme64.lib
    Xsens_xstypes_LIBRARY (Only for Windows) C:/Program Files/Xsens/MVN SDK 2018.0.3/SDK Files/x64/lib/xstypes64.lib

    (N.B the prefix of the following path can change depending on the version and the installation path chosen.)

  • build:

    • unix
    cd build
    make install
    
    • windows
    cd build
    cmake --build . --config Release --target INSTALL
    

human-dynamics-estimation

(Refer to human-dynamics-estimation for more details)

  • clone:

    cd $DEV
    git clone https://github.com/robotology/human-dynamics-estimation.git
    cd human-dynamics-estimation
    mkdir build
    

    (N.B. the human-dynamics-estimation software is under development and the stable branch for running the full HDE may change)

  • configure the following CMake variables and then generate (via CMake GUI or terminal):

    CMake Variables
    SOURCE CODE: $DEV/human-dynamics-estimation
    BUILD IN: $DEV/human-dynamics-estimation/build
    CMAKE_INSTALL_PREFIX $DEV/robotology-superbuild/build/install
  • build:

    • unix
    cd build
    make install
    
    • windows
    cd build
    cmake --build . --config Release --target INSTALL
    
  • Add Enviornment Variables

    Environment Variables
    YARP_DATA_DIRS $DEV\human-dynamics-estimation\app\urdfs