Skip to content

Running HDE Related Demos

Kourosh Darvish edited this page Aug 28, 2020 · 12 revisions

The human-dynamics-estimation library contains several devices that are launched together through a single yarprobotinterface processing with .xml configurations files. The configurations files are stored here. Currently, we have two main demos related to the human-dynamics-estimation library. The three main aspects related to running HDE related demos are:

  • Launching yarprobotinterface with the correct .xml configuration file. This will launch several devices from the human-dynamics-estimation library
  • Running yarprobotstatepublisher with correct arguments, in order to stream the link transforms of the model to be visualized in Rviz
  • Launching rviz with correct launch files that contain the .rviz configuration file to be loaded

Preliminary Steps

Running Human Kinematics & Robot Retargeting Demo

In order to run the human kinematics retargeted to a robot demo the following steps are required:

  • The .xml configuration files (for yarprobotinterface) related to this demo start with the prefix RobotStateProvider and a suffix _<robot-name> e.g. RobotStateProvider_iCub.xml. On running yarprobotinterface with these configuration files, you will see a rostopic opened with the names passed to the parameter humanJointsTopic e.g. /iCub/joint_states of HumanStatePublisher device. This rostopic contains the joint positions information for the robot model, that will be retargeted to the robot.
  • An example instance of running yarprobotinterface is as following:

yarprobotstatepublisher --period 0.0001 --name-prefix iCub --tf-prefix /iCub/ --model teleoperation_iCub_model_V_2_5.urdf --reduced-model true --base-frame root_link_fake --jointstates-topic "/iCub/joint_states"

The key arguments here are tf-prefix which will be the prefix of all the transforms, model which is the urdf file to be loaded, and jointstates-topic which is the rostopic that contains the joint positions information. After running yarprobotstatepublisher, run the command rostopic echo /tf to see if the transforms tfs are streamed correctly for rviz visualization

  • Finally, launch ros rviz tool by running a launch file. The launch file corresponding to the retargeting demo to icub robot is iCubRviz.launch. To launch rviz, run roslaunch HDERviz iCubRviz.launch

  • If you need to run the demo on the real icub robot, include the robot_position_controller device that is commented out in RobotStateProvider_iCub.xml config file.

Retargeting with multiple robots in simulation

Technically, we can run the human motion retargeting demo to multiple robot models. retargeting-robot-models contains the robot models we tested the retargeting demos in rviz. To run the retargeting demo with multiple robots, one has to run multiple configuration files along with multiple yarprobotstatepublisher instances. This can quickly become confusing and error prone. So, we made it easy by creating shell scripts that needs to be run once.

NOTE: Ensure that the retargeting-robot-models repo is correctly configured and installed on the machine on which the demo is to be run.

Running Robot Retargeting on the Pole

To run the demo, there are two application files in the yarpmanager to run. After calibrating the suit and streaming the data of the human, first, run the Xsens Retargeting Visualization application to visualize the retargeting results with rviz visualization. If everything works fine, stop all the processes in this application, and run the Xsens Retargeting Position Control Pole yarpmanager application. At this moment, the robot will imitate the human motion in all the joints (except the hand fingers).

Running Dynamics Estimation Demo

  • The yarprobotinterface configuration file needed to run human dynamics estiamtion file is Human.xml

  • Launch yarprobotstatepublisher by running the following command


yarprobotstatepublisher --period 0.0001 --name-prefix Human --tf-prefix /Human/ --model humanSubject01_66dof.urdf --reduced-model true --base-frame Pelvis --jointstates-topic "/Human/joint_states"

  • The launch file related to rviz visualization is HDERviz.launch. To launch rviz visualization, run roslaunch HDERviz HDERviz.launch

NOTE: Ensure that the urdf model used is consistent at all the states i.e.

  • model parameter passed to various devices in the Human.xml configuration file
  • model passed to the argument of yarprobotstatepublisher
  • model used in rviz launch file

This will result in a stable human model visualization, with clear connections between the links of the model. Also, ensure that the xsens suit wearable device is launched correctly with the measurements of the human subject as documented here