Giter Club home page Giter Club logo

hpp-rbprm-corba's Introduction

Humanoid Path Planner - RBPRM-CORBA module

Pipeline status Coverage report

Copyright 2015-2020 LAAS-CNRS

Authors: Steve Tonneau, Pierre Fernbach

Description

hpp-rbprm-corba implements python bindings for hpp-rbprm, and presents a few example files. Please refer to this link for information on hpp-rbprm.

Installation from binary package repository

  1. Add robotpkg/wip to your apt configuration: http://robotpkg.openrobots.org/robotpkg-wip.html
  2. sudo apt update && sudo apt install robotpkg-pyXX-hpp-rbprm-corba (replace pyXX with your python version)
  3. Then, you will need to export some variables to allow you system to find the executables:

export PATH=${PATH:+$PATH:}/opt/openrobots/bin:/opt/openrobots/sbin

export MANPATH=${MANPATH:+$MANPATH:}/opt/openrobots/man

export PYTHONPATH=/opt/openrobots/lib/pythonXX/site-packages:$PYTHONPATH(replace XX with your python version)

export ROS_PACKAGE_PATH="$ROS_PACKAGE_PATH:/opt/openrobots/share"

export DEVEL_HPP_DIR=/opt/openrobots/

(you may want to add these to your .bashrc file)

Installation From source on ubuntu-16.04 64 bit with ros-kinetic

  1. Follow this instructions : http://humanoid-path-planner.github.io/hpp-doc/download.html (select 'Devellopement" in the list)
  2. Once this installation is complete, run make rbprm

Optional: installing viewer and python bindings for dependencies

If you are planning to use the visualization tools used by the Gepetto team, along with python examples, you may need a few extra steps:

  1. Install the gepetto-viewer server

sudo apt install -qqy robotpkg-pyXX-qt4-gepetto-viewer-corba

sudo apt install -qqy robotpkg-pyXX-qt4-hpp-gepetto-viewer

  1. Install the pinocchio bindings

sudo apt install -qqy robotpkg-pyXX-pinocchio

  1. Install the dae extension for osg

sudo apt install -qqy robotpkg-osg-dae

Documentation

Open $DEVEL_DIR/install/share/doc/hpp-rbprm-corba/doxygen-html/index.html in a web brower and you will have access to the code documentation. If you are using ipython, the documentation of the methods implemented is also directly available in a python console.

Example

To see the planner in action, one example from our IJRR submission with HyQ is available. Examples with HRP-2 are also provided, though they can only be executed if you have access to HRP-2 model.

  • You can find the scripts in your install directory, in lib/pythonXX/dist-packages/hpp/corbaserver/rbprm/scenarios/demos folder.

  • The planning is decomposed in two phases / scripts. First, a root path is computed (\*_path.py files). Then, the contacts are generated along the computed path.

  • In order to start a scenario, run:

python -im hpp.corbaserver.rbprm demos.hyq_darpa

Replace demos.hyq_darpa with the name of any file in the demos or memmo folder to try different scenarios.

  • Once the script have been executed, you can display the results in the viewer (if you installed it):

    • If it was a \*_path.py script, you can run:

      • planner.play_path() to display the computed guide path

      • planner.v(planner.q_init) or planner.v(planner.q_goal) to put the robot at the initial / goal position of the planning

    • If it was a a contact generation script, you can run:

      • cg.display_sequence() to display the sequence of configurations in contact computed

      • cg.display_init_config() or cg.display_end_config() to put the robot at the initial / final whole body configuration

      • cg.v(cg.configs[i]) to display the i-th wholebody configuration of the sequence

      • cg.play_guide_path() to display the guide path

Creating a new scenario script

Start from one of the scripts in the scenarios/demos folder, eg talos_flatGround.py.

  • All the \*_path.py scripts must define a class called PathPlanner that inherit from one of the {robot}_path_planner classes defined in the scenarios folder.

    • In the run() method, define the environment used and the initial/goal position

    • If further customization is needed, override the required methods from the parent class.

  • All the contact generation scripts must define a class called ContactGenerator that inherit from one of the {robot}_contact_generator classes defined in the scenarios folder.

    • In the constructor of this class, the parent constructor must be called with an instance of the desired PathPlanner class, defining the environment and the guide trajectory.

    • This class may override any method from the parent class in order to change the default settings/choices regarding the contact generation

hpp-rbprm-corba's People

Contributors

daeunsong avatar florent-lamiraux avatar jasonchmn avatar jmirabel avatar laastp avatar nim65s avatar pfernbach avatar stonneau avatar teguhsl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hpp-rbprm-corba's Issues

hyq_visual dae could not be opened

Hello,

I installed HPP in ubuntu 16.04 and ros-kinetic as described :

Follow this instructions : http://humanoid-path-planner.github.io/hpp-doc/download.html (select 'Devellopement" in the list)
Once this installation is complete, run make rbprm

Then, when launching /hpp-rbprm-corba/scripts/scenarios/demos/darpa_hyq.py,
the following error is happened :
Error: gepetto.corbaserver.gepetto.Error(msg='File $ROS_PACKAGE_DIR/hyq-rbprm/meshes/hyq_visual.dae found but could not be opened. Check that a plugin exist.')

I thought this was related to collada-dom or osg-dae, but I already installed those.

How can I solve this?

Thanks.

FullBody.setStartState do not work with 3D contacts

The python API fullBody.setStartState(configurations,contacts) do not initialize the contact normal correctly when using 3D contacts.

After discussion, this method should raise an error when called for 3D contacts, and only the other method fullBody.setStartState(stateId) should be used. The state should be created with the python API that allow to manually set the normal.

wrong PYTHONPATH in CI

I don't understand why, but the CI has /opt/openrobots/lib/python3.6/site-packages/hpp in its $PYTHONPATH, so some tests are failing because a from gepetto.colors import Colortakes hpp.gepetto for gepetto

dependency on hpp.gepetto

Hi,

Launching tests without gepetto-viewer raised the following error:

  File "…/hpp/corbaserver/rbprm/scenarios/abstract_path_planner.py", line 2, in <module>
    from hpp.gepetto import ViewerFactory, PathPlayer
ModuleNotFoundError: No module named 'hpp.gepetto'

So I guess we should either declare this as a dependency, or put guards around those imports, to avoid aborting when this non-required module is not available.

suggestion for Kinodynamic/forceOrientaion

hello,

this is not really an issue but a suggestion for a small improvement.

As I tried out some scripts in script/scenarios folders, I found out that the parameter "Kinodynamic/forceOrientaion" to force the orientation of the trunk to match the direction of the motion seems like it could be improved.

The orientation of the trunk is trying to follow the exact direction of the motion, which results in failure of contact motion planning, especially when climbing up the stairs.

I think making the orientation of the trunk to follow the direction of the motion that is projected on to the x-y surface will work better, easier to find equilibrium states.

The specific scenario that I tried is script/scenarios/memmo/talos_stairs10_random.py.

Thank you.

Parameter missing in Function interpolateConfigs(...) in python

In function interpolateConfigs(...) in file : corbaserver/rbprm/rbprmfullbody.py
Need to change :
return self.clientRbprm.rbprm.interpolateConfigs(configs, robustnessTreshold, filt, testReachability, quasiStatic)
To
return self.clientRbprm.rbprm.interpolateConfigs(configs, robustnessTreshold, filt, testReachability, quasiStatic, True)

CORBA transient error when running the server

Issue originally opened in stonneau/hpp-rbprm#22


When I try to run hpp-rbprm-server I got this:

ORBA: CORBA::Exception TRANSIENT:IDL:omg.org/CORBA/TRANSIENT:1.0 : failed to narrow the root naming context
CORBA: CORBA::SystemException: failed to narrow the root naming context.
terminate called after throwing an instance of 'hpp::Exception'
  what():  Failed to start corba server.
Aborted (core dumped)

I got the same errors when running the other corbaserver

Originally posted by @teguhSL in stonneau/hpp-rbprm#22 (comment)


Hi @teguhSL

If you run nameclt list, do you have any error ?

Originally posted by @nim65s in stonneau/hpp-rbprm#22 (comment)

suspicious dependency on gepetto.blender.exportmotion

Hello everybody,
I let here this error I had. Just commenting this line worked in my case.

/opt/openrobots/lib/python2.7/site-packages/hpp/corbaserver/rbprm/rbprmfullbody.py in ()
19 from hpp.corbaserver.rbprm import Client as RbprmClient
20 from hpp.corbaserver.robot import Robot
---> 21 import hpp.gepetto.blender.exportmotion as em
22 from numpy import array, matrix
23 from hpp_spline import bezier

ImportError: No module named gepetto.blender.exportmotion

missing unit tests

The following functionalities do not work in the current binary release. They should be tested automatically:

  • the rbprmState file includes inexisting python file (com_inequalities.py)

  • the method addContact from fullBody takes an extra quaternion as parameter now

  • operator () from Path instance fails if extraconfigs are present

The last two issues have already been fixed but are not tested.

Parent initializer called in loadModel function

In rbprmbuilder and rbprmfullbody, parent initializer is called in loadModel function.
It may be better to put it back directly in the constructor.

def loadModel(self, urdfName, urdfNameroms, rootJointType, meshPackageName, packageName, urdfSuffix, srdfSuffix):
Robot.__init__(self, urdfName, rootJointType, False)

def loadFullBodyModel(self, urdfName, rootJointType, meshPackageName, packageName, urdfSuffix, srdfSuffix):
Robot.__init__(self, urdfName, rootJointType, False)

If done that way, we will have to move the client argument from loadModel() to constructor (See client argument : #53)

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.