Giter VIP home page Giter VIP logo

roboptim-retargeting's Introduction

roboptim-retargeting

Overview

RobOptim toolbox aiming at processing Motion Capture Data and in particular retarget motion capture data in order to allow a particular robot to replace the motion.

This toolbox relies on the following software:

  • Choreonoid (rigid body computation)
  • libmocap (motion capture data loading)

Optionally, if metapod is available, some constraints have also been implemented using this library.

It provides three command-line tools which are in fact the three steps of the conversion process:

  • roboptim-retargeting-markers
  • roboptim-retargeting-marker-to-joint-converter
  • roboptim-retargeting-joints

The marker optimization optimizes the markers positions in the Euclidian space. If the motion capture matches a human skeleton, this step will adapt the markers positions at each frame to make it match the robot morphology.

Marker to Joint converter converts marker positions to joints trajectories of a particular robot.

The joint optimization will, at least, reshape the joint trajectories to satisfy robotics constraints such as balance (ZMP), actuators limits (position, velocity, torque).

RobOptim Functions

All functions are placed into the include/roboptim/retargeting/function folder.

Acceleration (joint-based optimization and marker-based optimization)

#include <roboptim/retargeting/function/acceleration.hh

Use StateFunction to compute each joint/marker acceleration over three frames. This function can be used to penalize large motion as a cost function.

Marker Laplacian Deformation Energy (marker-based optimization)

#include <roboptim/retargeting/function/marker-laplacian-deformation-energy/choreonoid.hh>

Compute the Marker Laplacian Deformation Energy for markers.

Body Laplacian Deformation Energy (joint-based optimization)

#include <roboptim/retargeting/function/body-laplacian-deformation-energy/choreonoid.hh>

Compute the Marker Laplacian Deformation Energy for bodies.

Bone Length (marker-based optimization)

#include <roboptim/retargeting/function/bone-length/choreonoid.hh>

Compute bone length for each segment and compare it to the robot segments.

Joints limits (joint-based optimization)

#include <roboptim/retargeting/function/joint-limits/choreonoid.hh>

Compute joints positions and/or velocities and make sure they are in the actuators limits.

Joints torque limits (joint-based optimization)

#include <roboptim/retargeting/function/torque/choreonoid.hh>

Compute joints torques and make sure they are in the actuators limits.

Body position (joint-based optimization)

#include <roboptim/retargeting/function/forward-geometry/choreonoid.hh>

Force a particular body to stay at the correct location. Typically, it is used to force the feet on the floor.

ZMP (joint-based optimization)

#include <roboptim/retargeting/function/zmp/choreonoid.hh>

Compute the Zero-Momentum Point attached with the robot. If it stays in the support-polygon then the motion will remain balanced.

RobOptim Problems

Marker Optimization

Cost: Laplacian Deformation Energy (marker-based) and optionally acceleration.

Constraints:

  • Bone Length (linear function)

Joint Optimization

Cost: Laplacian Deformation Energy (joint-based) and optionally acceleration.

Constraints:

  • Joint Limits (position, velocity)
  • Body Position (feet on the ground)
  • Torque
  • ZMP

roboptim-retargeting's People

Contributors

thomas-moulard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

roboptim-retargeting's Issues

Testing data for the retargeting

I tried to build the roboptim-retargeting project, however, it failed to find the model as claimed in the CMakeLists.txt under roboptim-retargeting/tests/CMakeLists.txt
# Look for the HRP4C model.
FIND_PATH(HRP4C_DIRECTORY
NAMES HRP4Cg2main.wrl HRP4Cg2.yaml HRP4Cmain.wrl HRP4C.yaml
DOC "HRP-4C directory (as expected by Choreonoid, i.e. containing YAML files)"
)
I found some sample data under roboptim-retargeting/share/roboptim/retargeting/data/(human-to-hrp4c.morphing.yaml+sample.body-motion.yaml), but I am not sure if they are the missing data defined in the CMakeLists.txt shown above.

Write arm trajectory optimization test

Currently implemented in tests/minimum-jerk-problem.cc (a better name should be found).

  • minimum jerk trajectory generation
  • implement cost function (acceleration), 75% ok
  • problem definition
  • add ZMP constraint, see #2
  • add foot position constraint
  • add full log with curves of the whole optimization process with intermediary values. This requires some modifications in roboptim-core. See the following tickets:
  • limit joints positions and velocities ( #21 , #22 )

Cost Function: Reference Trajectory

  • Make VectorInterpolation a trajectory
    Require the class to be moved from roboptim-core to roboptim-trajectory with its test.
  • Implement cost function
  • Implement cost function gradient
  • Debugging cost function

Time Tracking:

  • 25 min (state cost implementation)
  • 25 min (vector interpolation is now a trajectory)
  • long (working around trajectory sum cost limitation)

Actually, implementation using TrajectorySumCost is not possible because the time is not known by the state function. Working around...

Spline Optimization

The goal is to replace the trajectory type by the cubic splines in roboptim-trajectory.

Tasks

  • Fit minimum jerk (or any other curve) on a spline: #28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.