Git Product home page Git Product logo

rbdl-toolkit's Introduction

RBDL - Rigid Body Dynamics Library Copyright (c) 2018-2022 Martin Felis [email protected] Felix Richter [email protected]

Introduction

RBDL is a highly efficient C++ library that contains some essential rigid body dynamics algorithms such as the Articulated Body Algorithm (ABA) for forward dynamics, Recursive Newton-Euler Algorithm (RNEA) for inverse dynamics and the Composite Rigid Body Algorithm (CRBA) for the efficient computation of the joint space inertia matrix. It further contains code for Jacobians, forward and inverse kinematics, handling of external constraints such as contacts and collisions, and closed-loop models.

The code was originally developed by Martin Felis [email protected] at the research group Optimization in Robotics and Biomechanics (ORB) of the Interdisciplinary Center for Scientific Computing (IWR) and Institute of Computer Engineering at Heidelberg University. The code closely follows the notation used in Roy Featherstone's book "Rigid Body Dynamics Algorithm".

Documentation

The documentation is contained in the code and can be extracted with the tool doxygen.

To create the documentation simply run

    doxygen Doxyfile

which will generate the documentation in the subdirectory ./doc/html. The main page will then be located in ./doc/html/index.html.

An online version of the generated documentation can be found at https://rbdl.github.io.

VCPKG package manager (for Windows, Linux and Mac)

As of 08-2021 rbdl is part of microsofts vcpkg, a tool to manage c++ dependencies on all major operating systems. The luamodel and urdfmodel addon are installed via vcpkg as well, other addons may be added in the future as well.

Install vcpkg by making a local clone from its GitHub repo https://github.com/Microsoft/vcpkg. Then run the vcpkg-bootstrapper script to set it up. For detailed installation instructions, see Install vcpkg. To integrate vcpkg with your Visual Studio or Visual Studio Code development environment, see Integrate vcpkg. Then, to use vcpkg to install or update a library, see Manage libraries with vcpkg. For more information about vcpkg commands, see vcpkg command-line reference.

Building RBDL from Source

The official rbdl git repository can be cloned from

    https://github.com/rbdl/rbdl

(See https://git-scm.com/downloads/guis/ for git clients.)

To make sure all submodules are correctly downloaded, clone the repository recursively!

git clone --recursive https://github.com/rbdl/rbdl

Upgrading from an older version of RBDL

For convenience there is a script to upgrade to the newest RBDL repository version.

./upgrade.sh

It pulls the latest commits from master and also checks out the correct version of all sub repositories. Manual upgrading requires doing the following:

git pull origin master
git submodule update --init

Building and Installation

Linux: RBDL

  1. Prior to installation update the apt system. Open a terminal and type
  sudo apt update
  sudo apt upgrade
  1. Install git
  sudo apt install git-core
  1. Install cmake
  sudo apt install cmake
  1. Install Eigen3 RBDL uses Eigen3 for efficient computations (http://eigen.tuxfamily.org).
  sudo apt install libeigen3-dev
  1. Install a c++ compiler The choice of compiler can have a large effect on performance. Consider evaluating a few different compilers, such as Clang, for the best performance.
  sudo apt-get install build-essential
  1. Install cmake-curses (optional) If you are planning on taking advantage of the many addons and other build options we recommend that you use cmake-curses as it makes the build configuration process faster and less prone to error.
  sudo apt install cmake-curses-gui
  1. Install Catch2 (optional) Install Catch2 if you want to run RBDL's test code.

At the moment most linux distributions do not have catch2 in their repositories yet. So the recommended install approach is to build it from source.

$ git clone --branch v2.x https://github.com/catchorg/Catch2.git
$ cd Catch2
$ cmake -Bbuild -H. -DBUILD_TESTING=OFF
$ sudo cmake --build build/ --target install 
  1. Build RBDL using CMake (http://www.cmake.org). To compile the library in a separate directory in Release mode use:
  mkdir /rbdl-build
  cd rbdl-build/
  cmake -D CMAKE_BUILD_TYPE=Release ../rbdl
  make

If you have installed cmake-curses-gui you can see all of the available build options by running cmake-curses

  mkdir /rbdl-build
  cd rbdl-build/
  ccmake ../rbdl 

at which point you will see full list of build options for RBDL. We recommend that you build and run RBDL's test code at least once by building RBDL with

RBDL_BUILD_TESTS                 ON
RUN_AUTOMATIC_TESTS              ON

Linux: RBDL's documentation

  1. Install doxygen
    sudo apt install doxygen
  1. Build the doxygen:
  • Open a terminal in the RBDL source directory and type
doxygen Doxyfile
  1. Open the file doc/html/index.html in a web-browser.

Linux: RBDL's examples

  1. Install Boost (optional) Boost is needed to run many of the example simulations that come with RBDL.
sudo apt install libboost-all-dev

Linux: RBDL's addon dependencies

  1. luamodel addon:
  • If you'd like to load model files written in Lua to RBDL. Without this addon you will need to build models programmatically, or read them in using the URDF addon. To do so:
  • Install Lua51
  sudo apt install lua5.1
  sudo apt install liblua5.1-0-dev
  • Build RBDL with
  RBDL_BUILD_ADDON_LUAMODEL        ON
  1. urdf addon
  • If you'd like to load model files written in URDF to RBDL. This addon uses the URDF_Parser library which is included as a submodule. You will need to have cloned the repository recursively! If you missed doing that you can intialize the submodules (from a terminal within the source directory) after the fact with:
git submodule init
git submodule update
  • Build RBDL with
RBDL_BUILD_ADDON_URDFREADER        ON
  1. muscle addon
  • If you'd like to include muscles in your RBDL muscles, such as those in Millard et al., then build RBDL with
  RBDL_BUILD_ADDON_GEOMETRY ON
  RBDL_BUILD_ADDON_MUSCLE   ON
  • The geometry addon is a dependency which cmake will automatically include
  • Millard M, Emonds AL, Harant M, Mombaur K. A reduced muscle model and planar musculoskeletal model fit for the simulation of whole-body movements. Journal of biomechanics. 2019 Apr 10.
  1. muscle addon: muscle fitting option
  • If you'd like to make use of the muscle fitting algorithms detailed in Millard et al.
  • Install Ipopt. One of the easier ways to do this is to follow these instructions from Ipopt's online documentation which guides you through the process. Instructions to build the code appear in the README located in the Ipopt folder
  • Configure RBDL's cmake file with these flags set to 'On'
        RBDL_BUILD_ADDON_GEOMETRY        ON
        RBDL_BUILD_ADDON_LUAMODEL        ON
        RBDL_BUILD_ADDON_MUSCLE          ON
        RBDL_BUILD_ADDON_MUSCLE_FITTING  ON
  • Set the CUSTOM_IPOPT_PATH to the main Ipopt directory.
  • Build RBDL
  • Update your .bashrc file so that Ipopt's lib folder is in LD_LIBRARY_PATH
      export IPOPT_HOME=/home/mjhmilla/dev/Ipopt-3.12.8
      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IPOPT_HOME/lib
  • As of March 2019 all of the muscle fitting code has been tested with Ipopt-3.12.8.
  • Millard M, Emonds AL, Harant M, Mombaur K. A reduced muscle model and planar musculoskeletal model fit for the simulation of whole-body movements. Journal of biomechanics. 2019 Apr 10.

Linux: ROS 1 (Noetic)

  1. If you are facing build issues in Ubuntu 20.04 system which has ROS Noetic already installed. run the following command
     sudo apt install -y ros-noetic-urdf

Because,by default, the ros urdf library is used to parse the urdf model when you are building this library in a Ubuntu system with ROS Noetic. So, ros urdf library needs to be installed before building this library.

Note:- It is tested with Ubuntu 20.04 system and ROS1 Noetic version only. It might not work with other ROS1 versions (other than Noetic) and ROS2.

Windows

Although RBDL can be installed on Windows, none of the ORB members currently uses Windows and so we are unable to provide detailed instructions.

Python Bindings

RBDL can also build an experimental python wrapper that works with python 3 and python 2. To do this enable the the RBDL_BUILD_PYTHON_WRAPPER cmake options. This will build the wrapper for python 3, if you want to use python 2 instead you will also have to enable the RBDL_USE_PYTHON_2 cmake option. The result of this is an extra python directory in the build directory. From within which you can install it using setup.py. This is done automatically when using make install

Linux: Python wrapper dependencies

  1. Install Python3, NumPy, SciPy, & Matplotlib (optional) Most of RBDL is accessible through Python. If you are interested in using the RBDL through Python these instructions:
  • If you are using Ubuntu 18.04 or later python3 comes pre-installed.
  • To check if you have python3, in a command shell type
python3 -V
  • If you already have python3 installed system-wide then you can get the remaining libraries with
sudo apt install cython3 python3-numpy python3-scipy python3-matplotlib
  • If you are not using Ubuntu 18.04, and do not currently have python3, please look for instructions online to install these libraries on your system.
  1. Build and install RBDL with the
RBDL_BUILD_PYTHON_WRAPPER : ON

(Note: you may need sudo privileges to install the rbdl.egg_info file to usr/local/lib/python directory.) 3. Add RBDL to Python's path Update your .bashrc file so that python can find the python version of rbdl. To do this you need to add the path to 'rbdl-build/python' to the PYTHONPATH which can be done by adding the following line to your .bashrc file.

export PYTHONPATH=$PYTHONPATH:<path-to-the-RBDL-build-directory>/python

Resources to learn more

There are four main ways to learn about anything that appears in RBDL:

  1. The examples folder
  • There are a set of deep-dive examples which are accompanied by detailed documentation: if you are new to RBDL start here first.
  • There are also a set of minimalistic examples
  • The examples cover the basics reasonably well, but currently many advanced items (quaternion joints, custom-joints, custom-constraints, muscle-fitting) do not have examples.
  1. The Doxygen documentation
  • The Doxygen for methods and components that were developed recently are covered in great detail (e.g. the Millard2016TorqueMuscle class in the muscle addon).
  • Doxygen for more well established methods are more sparsely documented.
  1. The test code;
  • A minimalistic example of every command and modeling component can be found in the test code (e.g. in rbdl/tests, addons/geometry/tests, addons/muscle/tests, etc).
  • A specific command can be easily found by using a text editor that can search an entire directory (e.g. sublime text) of text files for a keyword.
  1. The literature.
  • In addition to Featherstone's text and Felis's papers there are a number of exciting methods and modeling tools which are included in RBDL.
  • The appropriate literature references are mentioned in the doxygen for the method in question.

Citation

An overview of the theoretical and implementation details has been published in [https://doi.org/10.1007/s10514-016-9574-0](Felis, M.L. Auton Robot (2017) 41: 495). To cite RBDL in your academic research you can use the following BibTeX entry:

@Article{Felis2016,
  author="Felis, Martin L.",
  title="RBDL: an efficient rigid-body dynamics library using recursive algorithms",
  journal="Autonomous Robots",
  year="2016",
  pages="1--17",
  issn="1573-7527",
  doi="10.1007/s10514-016-9574-0",
  url="http://dx.doi.org/10.1007/s10514-016-9574-0"
}

Licensing

The library is published under the very permissive zlib free software license which should allow you to use the software wherever you need.

This is the full license text (zlib license):

RBDL - Rigid Body Dynamics Library
Copyright (c) 2011-2020 Martin Felis <[email protected]>

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

   1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required.

   2. Altered source versions must be plainly marked as such, and must not
   be misrepresented as being the original software.

   3. This notice may not be removed or altered from any source
   distribution.

Acknowledgements

Work on this library was originally funded by the Heidelberg Graduate School of Mathematical and Computational Methods for the Sciences (HGS), and the European FP7 projects ECHORD (grant number 231143) and Koroibot (grant number 611909).

Work on the geometry and muscle addons was completed by Matthew Millard [email protected]. Financial support from Deutsche Forschungs Gemeinschaft grant no. MI 2109/1-1 and from the European Commission within the H2020 project Spexor (GA 687662) is gratefully acknowledged.

rbdl-toolkit's People

Contributors

idlebear avatar jfslin avatar ju6ge avatar

Stargazers

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

Watchers

 avatar  avatar

rbdl-toolkit's Issues

App Image libx264 not found

When trying to render a video with the AppImage it crashes in some cases with libx264 not found. Probably this library needs to be added to the image as well. But this will require some debugging, since this library searched and loaded with in the ffmpeg code.

URDF file read ERROR

When I load the same URDF file using ROS and RBDL-Toolkit, their results are different? The URDF displayed by rBDL-Toolkit is incorrect. How can I solve this problem?
The urdf in ros rviz
image
The urdf in RBDL_toolkit
image

rbdl-toolkit load lua model with meshes different with the result with Meshup tools.

Hi, there. The work about these projects around rbdl is amazing, and i recently learn a lot .
I want to load the lua four link model with meshes created myself. The meshes of each frame is created from a STL file to an .obj file by blender, and the base coordiante of the STL file is exactly concide with the body frame of each body.
When i use the Meshup tool to load the lua model, everything goes fine, and the meshes showed right. However, when i use the rbdl-toolkit, the orientation of the meshbody is different. I dont know why.
I can solve this problem by adding rotaions of the object in lua file, but i thought it could be better load the file as same as the Meshup tool, cause the stl coordinate is designed right.
And what's more when i use rbdl-toolkit to load the human lua file created by ModelFactory with matlab, the result is not right, and when i use meshup tool, it works fine .

The lua file is as follows:
print("Lua: start Constructing four link_2")
l1=1 --1.0
l2=8 --8.0
l3=5 --6.0 why 5 will be calculated slow and maybe not right?
p_x0=5 --5.0
p_y0=3.0*0

print("Lua: Making the meshes")
meshes = {
link1 = {
color = { 1, 0, 0 },
--mesh_center = { 0, 0, 0 },
src = "link1.obj",
translate={0,0,0},
scale={1.5,1,1},
rotate={
axis={0,0,1},
angle=0,
}
},
link2 = {
color = { 0.3, 0.5, 0 },
--mesh_center = { 0, 0, 0 },
src = "link2.obj",
translate={0,0,0},
rotate={
axis={0,0,1},
angle=0,
}
},
link3 = {
dimensions = { 0.05, l3, 0.05 },
color = { 0, 0, 1 },
mesh_center = { 0, l3/2, 0 },
src = "unit_cube.obj",
},
}

inertiaMatrix = {
{5.0,0. ,0. },
{0. ,5.0,0. },
{0. ,0. ,5.0}
}
bodies = {
link1 = { mass = 1.0,
com = {0.0,l1/2,0.},
inertia = inertiaMatrix},
link2 = { mass = 3.,
com = {0.,l2/2,0.},
inertia = inertiaMatrix},
link3 = { mass = 3.,
com = {0.,l3/2,0.},
inertia = inertiaMatrix},
}

print("Lua: Making the model")
model = {
animation_settings = {
force_scale = 0.1,
torque_scale = 0.1,
force_color = {1., 1., 0.},
torque_color = {0., 1., 0.},
force_transparency = 0.25,
torque_transparency = 0.25,
--frames_scale=5,
},
gravity = {0., -9.81, 0.},
configuration = {
axis_front = { 1, 0, 0,},
axis_right = { 0, -1, 0,},
axis_up = { 0, 0, 1,},
},
constraint_sets = {
PinJoint = {
{constraint_type = "loop",
name = "x",
predecessor_body = "ROOT",
successor_body = "K3",
predecessor_transform = {
E = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1},
},
r = {p_x0, p_y0, 0.000},
},
successor_transform = {
E = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1},
},
r = {0.0, l3, 0.0,},
},
axis = {0, 0, 0, 1, 0, 0},
stabilization_coefficient = 1.0,
baumgarte_enabled = false,
},
{constraint_type = "loop",
name = "y",
predecessor_body = "ROOT",
successor_body = "K3",
predecessor_transform = {
E = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1},
},
r = {p_x0, p_y0, 0.000},
},
successor_transform = {
E = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1},
},
r = {0.0, l3, 0.0,},
},
axis = {0, 0, 0, 0, 1, 0},
stabilization_coefficient = 1.0,
baumgarte_enabled = false,
},
},
},
points = {
{name = "mass1",body = "K1",point = bodies.link1.com,},
{name = "mass2",body = "K2",point = bodies.link2.com,},
{name = "mass3",body = "K3",point = bodies.link3.com,},
--{name = "p1",body = "K2",point = {1,2,3},color={0,0,1},},
},
frames = {
{
name = "K1",
parent = "ROOT",
body = bodies.link1,
visuals = {meshes.link1},
joint = {{0.,0.,1.,0.,0.,0.}},
joint_frame = {
E = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1},
},
r = {0, 0, 0.0},
},
-- points={
-- K1_p1={coordinates={1,2,3},color={0,1,0.5},draw_line=1,line_width=1,},
-- }
},
{
name = "K2",
parent = "K1",
body = bodies.link2,
visuals = {meshes.link2},
joint = {{0.,0.,1.,0.,0.,0.}},
joint_frame = {
E = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1},
},
r = {0.,l1, 0.},
}
},
{
name = "K3",
parent = "K2",
body = bodies.link3,
visuals = {meshes.link3},
joint = {{0.,0.,1.,0.,0.,0.},},
joint_frame = {
E = {
{1, 0, 0},
{0, 1, 0},
{0, 0, 1},
},
r = {0.,l2, 0.},
}
},
},
}

return model

plugins and setting not loading

I built the rbdl-toolkit from source but the plugin are not loading. When i click on the plugin button it just turns blue and no menu appears showing the plugin. I have tested this both with the optimal on and off. Additionally, the setting under Toolkit menu shows nothing when it open up.

I am suing Qt 5.15.2 is this a problem? Is there a command line option i need to include?

toolkit HCRMI todo

Starting a todo list of things that I think we will need to get Toolkit operating for regular HCRMI use at UW. I will summarize the current conversations regarding each of these issues, and we can create specific issues for them separately as needed. We can change this around as needed. If this should be moved elsewhere, I can do that as well.

Main goals:

  • IK with URDF models

  • Improve documentation

  • Get RBDL Toolkit operational on Ubuntu 20.04

    • It sounds like AppImage might not play well on 20.04. This will need further testing
    • #13: "The AppImage was build using Ubuntu 18.04. According to the AppImage documention it should therefor run on anything newer. My Main system at home is using Arch and the it works just fine. But I also have seen previous versions of the toolkit AppImage fail on newer Ubuntu versions. Sadly debugging did not lead to a good explanation for why this happens and also the errors where not reproducible on a different machine with the same base operating system."
    • Slack with @ju6ge: "I would stick to 18.04 as the target for now because Canonical has been changing a lot of stuff in regards to their future vision about their packaging (they are pushing for snap packages). For now I think 18.04 is more stable."
  • Generate basic wireframe on models that does not have explicit mesh information

    • Right now, Toolkit requires some mesh information to exist within the lua/urdf model before it visualizes anything. I think we should create some basic wireframe that draws straight lines between each tree node to serve as some basic visualization in cases that no meshes are found
    • #13: "Okay so the reemc_hd.lua is a valid lua model, but it does not specify any visuals, meaning there is no mesh information in there and therefor rbdl-toolkit has nothing to display"
  • Create documentation on how to load Lua and URDF models @jfslin

    • Currently, no baseline documentation exists, so any sort of documentation will be helpful
  • Load URDF models, including files created using Gazebo (ie REEM C from Docker) @jfslin

    • I haven't actually tried this yet, but if it works, it should be added to the Lua/URDF documentation
  • Add ability to define ModelMarkers URDF information into the model via Toolkit @RVSagar

    • Most models will not have ModelMarker information within it, meaning we cannot IK with it
    • Might need to come up with a file format and notation just for this
    • Details: #14 (comment)
  • Add marker names into GUI after a file (or model) is loaded

    • Slack with @ju6ge: "displaying marker names is not part of the code, but i think that would be a lot easier to add โ€ฆ to do that you would need to look into the implementation of the MotionMarkerPlugin, it implements creating the marker scene objects that get attached to the model. Qt3D should have functionalty to display text is some form or another, so you would need to attach a text object to the marker objects that get displayed, maybe even add a setting to enable displaying of the markers."
  • Documentation

Linking error ...

When I run rbdl-toolkit on a test model and file I get a linking error:


rbdl-toolkit: error while loading shared libraries: librbdl.so.3.0.0: cannot open shared object file: No such file or directory

I have just built the latest version of rbdl from the Orb-hd page, and the install folder contains librbdl.so.3.0.0. I suspect this is a CMakeLists error in rbdl-toolkit. Perhaps the custom rbdl directory is not being used to find the library? I'd check myself right now but I'm nearly out of time today.

CMake Error at CMakeLists.txt:175 (INSTALL)

cmake -DCUSTOM_QT_PATH=~/Qt/5.14.2/gcc_64 ..

-- Found RBDL: /usr/local/lib/librbdl.so
-- Found RBDL LUAMODEL: /usr/local/lib/librbdl_luamodel.so
-- Boost version: 1.65.1
CMake Error at CMakeLists.txt:175 (INSTALL):
  INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
  "toolkitlib".


-- Configuring incomplete, errors occurred!
See also "~/Src/dynamicTools/rbdl-toolkit/build/CMakeFiles/CMakeOutput.log".

Wireframe without mesh not showing up if no meshes are defined

I tried loading the following double pendulum Lua model and was expecting to see the wireframe, but instead got a blank screen. No error messages shown.

Probably not urgent since the tutorial will show how to incorporate standard meshes so it's less of a concern, I think.

rod_length = 1

model = {
  gravity = { 0, -9.81, 0 },

  configuration = {
	axis_right = { 1, 0, 0 },
	axis_front = { 0, 1, 0 },
	axis_up =    { 0, 0, 1 },
  },

  frames = {
	{
	  name = "segment1",
	  parent = "ROOT",
	  visuals = { meshes.rod1 },
	  joint = {{ 0, 1, 0, 0, 0, 0 }},
	  joint_frame = {
		E = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
	  }
	},
	{
	  name = "segment2",
	  parent = "segment1",
	  joint = {{ 0, 1, 0, 0, 0, 0 }},
	  joint_frame = {
		r = { 0., 0., -rod_length },
		E = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
	  }
	},
	{
	  name = "segment3",
	  parent = "segment1",
	  joint = {{ 0, 1, 0, 0, 0, 0 }},
	  joint_frame = {
		r = { 0., 0., rod_length },
		E = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
	  }
	}
  }
}

return model

Loading the proper meshes did provide the wireframe though:

rod_length = 1

meshes = {
  rod1 = {
	color = { 1, 0, 0},
	mesh_center = {0, 0, -rod_length/2},
	dimensions = { 0.1, 0.1, rod_length},
	src = "unit_cube.obj"
  },
  rod2 = {
	color = { 0, 1, 0},
	mesh_center = {0, 0, -rod_length/2},
	dimensions = { 0.1, 0.1, rod_length},
	src = "unit_cube.obj"
  }
}

model = {
  gravity = { 0, -9.81, 0 },

  configuration = {
	axis_right = { 1, 0, 0 },
	axis_front = { 0, 1, 0 },
	axis_up =    { 0, 0, 1 },
  },

  frames = {
	{
	  name = "segment1",
	  parent = "ROOT",
	  visuals = { meshes.rod1 },
	  joint = {{ 0, 1, 0, 0, 0, 0 }},
	  joint_frame = {
		E = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
	  }
	},
	{
	  name = "segment2",
	  parent = "segment1",
	  visuals = { meshes.rod2 },
	  joint = {{ 0, 1, 0, 0, 0, 0 }},
	  joint_frame = {
		r = { 0., 0., -rod_length },
		E = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
	  }
	},
	{
	  name = "segment3",
	  parent = "segment1",
	  visuals = { meshes.rod2 },
	  joint = {{ 0, 1, 0, 0, 0, 0 }},
	  joint_frame = {
		r = { 0., 0., rod_length },
		E = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
	  }
	}
  }
}

return model

ccmake issues with plugins enabled

I am trying to build the core and optional plugins. If I set TOOLKIT_BUILD_CORE_PLUGINS and TOOLKIT_BUILD_OPTIONAL_PLUGINS to OFF, then it completes correctly. I have libunittest++-dev installed via apt. I installed catch2 via catchorg/Catch2#1383 (comment).

 CMAKE_BUILD_TYPE                                                                                                                                 
 CMAKE_INSTALL_PREFIX             /usr/local                                                                                                      
 CUSTOM_QT_PATH                   /home/jf2lin/Qt/5.15.2/gcc_64                                                                                   
 CUSTOM_RBDL_PATH                                                                                                                                 
 Catch2_DIR                       /usr/local/lib/cmake/Catch2                                                                                      
 Qt53DCore_DIR                    /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt53DCore                                                               
 Qt53DExtras_DIR                  /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt53DExtras                                                             
 Qt53DInput_DIR                   /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt53DInput                                                              
 Qt53DLogic_DIR                   /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt53DLogic                                                              
 Qt53DRender_DIR                  /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt53DRender                                                             
 Qt5Core_DIR                      /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt5Core                                                                 
 Qt5Gamepad_DIR                   /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt5Gamepad                                                              
 Qt5Gui_DIR                       /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt5Gui                                                                  
 Qt5Network_DIR                   /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt5Network                                                              
 Qt5Widgets_DIR                   /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt5Widgets                                                              
 Qt5_DIR                          /home/jf2lin/Qt/5.15.2/gcc_64/lib/cmake/Qt5                                                                     
 TOOLKIT_BUILD_CORE_PLUGINS       ON                                                                                                              
 TOOLKIT_BUILD_OPTIONAL_PLUGINS   ON                                                                                                              
 URDF_BUILD_TEST                  ON                                                                                                              
 UnitTest++_DIR                   UnitTest++_DIR-NOTFOUND                                                                                         

However, trying to compile this gives me the following:

CMake Warning at plugins/MotionMarkerPlugin/c3dfile/tests/CMakeLists.txt:11 (FIND_PACKAGE):
   By not providing "FindUnitTest++.cmake" in CMAKE_MODULE_PATH this project
   has asked CMake to find a package configuration file provided by
   "UnitTest++", but CMake did not find one.

   Could not find a package configuration file provided by "UnitTest++" with
   any of the following names:

     UnitTest++Config.cmake
     unittest++-config.cmake

   Add the installation prefix of "UnitTest++" to CMAKE_PREFIX_PATH or set
   "UnitTest++_DIR" to a directory containing one of the above files.  If
   "UnitTest++" provides a separate development package or SDK, be sure it has
   been installed.


 CMake Error at vendor/urdfparser/CMakeLists.txt:36 (ADD_EXECUTABLE):
   The target name "test" is reserved or not valid for certain CMake features,
   such as generator expressions, and may result in undefined behavior.


 CMake Error at vendor/urdfparser/CMakeLists.txt:37 (TARGET_LINK_LIBRARIES):
   Cannot specify link libraries for target "test" which is not built by this
   project.

I can't seem to find a unittest cmake file with my local unittest install, and couldn't find any resources online about it.

Model documentation

I've started some model documentation but I think someone will need to fill in same of the gaps.

@ju6ge do you have a working Lua and/or URDF model that only has 2-3 links so it's to read? I took the prosthesis model you sent me and cropped out only the right arm. It loads okay, so we could probably stick with that if needed.

Camera movement edge cases

There are 2 edge cases where the camera movement breaks.

  1. If you jump to the view from top and also jumped to side and front view previously all axis are perfectly alligned and camera movement just breaks. Jumping to the front or side view again, allows the camera to move again.

  2. If you enter the orthographic view zooming does nothing anymore. This is due to the nature of orthographic drawing, but it would be nice if zooming in this mode would rescale the viewport.

Render Image, Image Sequence and Video all produce blank images

As the title suggests, creating a model with an animation and attempting to render it results in a series of blank images.
The Qt library is writing:

QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined 

to the terminal window.

Source pulled as of Feb 13, 2021. Qt library: 5.15.2.

Building on Linux system

Hello,

I am having trouble building the package on my linux system. I followed the install instructions for Qt5 but I dont seem to have anything close to the path ~/Qt5.13/5.13.2/gcc_64

I have built and compiled QT5.15 with a parallel build folder. so I have the following folders

qt5/
qt5-build/

which were created by following the install instructions linked in your wiki. (https://wiki.qt.io/Building_Qt_5_from_Git#Getting_the_source_code)
What am I doing wrong?

Header in Animation CSV, breaks reading

Currently when a csv has a header line, it is expected that it has the same amount of columns as the rest of the file. This mostly is not the case when considering old meshup animation files and therefor we need to switch to another csv reader library or write our own.

For now throwing an error is sufficient since just removing the header from the file fixes the problem.

Flying links

This is an interesting one. Using

rod_length = 1

meshes = {
  rod1 = {
	color = { 1, 0, 0},
	mesh_center = {0, 0, -rod_length/2},
	dimensions = { 0.2, 0.2, rod_length},
	src = "unit_cube.obj"
  }
}

model = {
  configuration = {
	axis_right = { 1, 0, 0 },
	axis_front = { 0, 1, 0 },
	axis_up =    { 0, 0, 1 },
  },

  frames = {
	{
	  name = "segment1",
	  parent = "ROOT",
	  visuals = { meshes.rod1 },
	  joint = {{ 0, 1, 0, 0, 0, 0 }},
	  joint_frame = {
		E = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
	  }
	}
  }
}

return model

and

0, 0
1, 1.57
2, 3.14
3, 4.73
4, 6.28

I get a normal looking render. However, if I change to E = {{1, 0, 0}, {0, -1, 0}, {0, 0, 1}}, not only does it not flip the axis rotation, the limb also flies into the screen. It looks like E doesn't like a flip from right hand rotations to left hand rotations.

video_e100010001.mp4
video_e1000-10001.mp4

Error loading URDF models

I am trying to use rbdl-toolkit to perform IK, but have been unable to figure out how to proceed. I have separated this into 2 issues:

  • Unable to load URDF models
  • Unable to IK

Tried two different versions of rbdl-toolkit:

  • rbdl-toolkit built using Ubuntu 20.04, QT 5.13.2
  • rbdl-toolkit + plugins precompiled as AppImage

Working with 3 different models (2 of which should be working with rbdl-toolkit already):

  • reemc_uw.urdf that I generated from the REEM C docker image using xacro
  • reemc_hd.lua that I recieved from Heidelberg
  • iCubHeidelberg01_no_weights.urdf that I received from Heidelberg

Trying built toolkit with the three model files:

jf2lin@HCRMIPC002:~/Downloads/rbdl$ rbdl-toolkit --model reemc_uw.urdf 
/usr/local/share/ORB/rbdl-toolkit
  • Receives error: Error running file: /home/jf2lin/Downloads/rbdl/reemc_uw.urdf:1:unexpected symbol near '<'
  • Result in rbdl-toolkit loading with no model
jf2lin@HCRMIPC002:~/Downloads/rbdl$ rbdl-toolkit --model iCubHeidelberg01_no_weights.urdf 
/usr/local/share/ORB/rbdl-toolkit
  • Receives error: Error running file: /home/jf2lin/Downloads/rbdl/reemc_uw.urdf:1:unexpected symbol near '<'
  • Result in rbdl-toolkit loading with no model
jf2lin@HCRMIPC002:~/Downloads/rbdl$ rbdl-toolkit --model reemc_hd.lua
/usr/local/share/ORB/rbdl-toolkit
  • Receives no error
  • Results in rbdl-toolkit loading with both the "grid" and the "reemc_hd" model on the sidebar, but no reem c model in the window. Clicking on the "grid" checkbox makes the grid disappear, but
  • I can also load the lua model via the UI, but no figure show up either

Now trying the AppImage toolkit with the three model files:

jf2lin@HCRMIPC002:~/Downloads/rbdl$ ./rbdl-toolkit-x86_64.AppImage --model reemc_uw.urdf 
./rbdl-toolkit-x86_64.AppImage: symbol lookup error: /tmp/.mount_rbdl-teG56tS/usr/bin/../lib/libQt5Widgets.so.5: undefined symbol: _ZN22QGuiApplicationPrivate12addQtOptionsEP5QListI18QCommandLineOptionE, version Qt_5_PRIVATE_API
jf2lin@HCRMIPC002:~/Downloads/rbdl$ sudo !!
sudo ./rbdl-toolkit-x86_64.AppImage --model reemc_uw.urdf 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
/tmp/.mount_rbdl-t9NrI3t/usr/local/share/ORB/rbdl-toolkit
Segmentation fault
  • Result in no rbdl-toolkit loading
jf2lin@HCRMIPC002:~/Downloads/rbdl$ ./rbdl-toolkit-x86_64.AppImage --model reemc_hd.lua 
./rbdl-toolkit-x86_64.AppImage: symbol lookup error: /tmp/.mount_rbdl-t1h1gjT/usr/bin/../lib/libQt5Widgets.so.5: undefined symbol: _ZN22QGuiApplicationPrivate12addQtOptionsEP5QListI18QCommandLineOptionE, version Qt_5_PRIVATE_API
jf2lin@HCRMIPC002:~/Downloads/rbdl$ sudo ./rbdl-toolkit-x86_64.AppImage --model reemc_hd.lua 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
/tmp/.mount_rbdl-tNSc0Or/usr/local/share/ORB/rbdl-toolkit
  • Receives no error
  • Results in rbdl-toolkit loading with both the "grid" and the "reemc_hd" model on the sidebar, but no reem c model in the window
jf2lin@HCRMIPC002:~/Downloads/rbdl$ sudo ./rbdl-toolkit-x86_64.AppImage --model iCubHeidelberg01_no_weights.urdf 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
/tmp/.mount_rbdl-tl6pNDG/usr/local/share/ORB/rbdl-toolkit
  • Receives error: Could not load the model! No file with filename: model://iCubHeidelberg01_model/dae_meshes/sim_chest__prt.dae found!

So it seems like the only workable option for me is the reemc_hd lua model, in both the compiled version as well as the AppImage version, but I'm guessing that no model showing up is a bit odd.

Implement IK with URDF models

I am trying to use rbdl-toolkit to perform IK, but have been unable to figure out how to proceed. I have separated this into 2 issues:

  • Unable to load URDF models
  • Unable to IK

Using the rbdl-toolkit + plugins precompiled as AppImage, I was able to enable all the plug-ins, and was able to load a .c3d file. However, I get a missing model error instead (likely related to the missing model issue in #13):

image

I was also wondering if there was an existing guide on how to use the IK plugin? Thank you.

I am encounterd the CMake error with "Qt53DExtras".

Hello. I would like to visualize the rbdl lib works with your tool kit.
As far as I followed your instruction, I am encountered an error after cloning source code.

Could not find a package configuration file provided by "Qt53DExtras" with
  any of the following names:

    Qt53DExtrasConfig.cmake
    qt53dextras-config.cmake```

Could you give me some instruction to resolve this?

Small things to fix:

  1. Insert this line in the CMakeLists.txt file before the block of FIND_PACKAGE statements:

SET(CUSTOM_RBDL_PATH "" CACHE PATH "Path to specific RBDL Installation")

  1. In the Toolkit->File menu I see two entries for 'Load Animation'

  2. The arrow keys no longer move the camera position. If this is quick and easy to add, consider doing so.

  3. With the mouse I can rotate, and I can pan. I don't know how to zoom, or walk forwards. How do I do this?

  4. It's nice to have the option of seeing a solid floor. Though I suppose I can add this in the Lua file, so never mind!

constraint questions

@ju6ge a few questions from one of our student

  1. A have a budget double pendulum working, but don't quite understand the joint specification. I understand that the 'joint_frame' entry is in terms of the parent's frame of reference, but how do you specify the joint location relative to the child or the child's center of mass? Or is it always at ( 0,0,0 ) for the child?
  2. I noticed the example double pendulum uses constraints to pin the components together. Doesn't a joint already do that?
  3. in the example double pendulum, both bodies are attached to the ROOT, shouldn't they be a kinetic chain ROOT->K1->K2? Or is that handled by the constraints?

CMake complains when TOOLKIT_BUILD_OPTIONAL_PLUGINS = On

Of course I wanted to try the fancy stuff out : )

When I set "TOOLKIT_BUILD_OPTIONAL_PLUGINS" to "On"

then CMake complains with the message:


CMake Error at plugins/RenderPlugin/CMakeLists.txt:35 (ADD_SUBDIRECTORY):
The source directory

 /home/mjhmilla/dev/orbGitHubCode/meshup2020/plugins/RenderPlugin/vendor/QVideoWriter

does not contain a CMakeLists.txt file.


Joint rotation does not seem to obey right hand rule

Starting with a basic lua model, and a basic csv:

rod_length = 1

meshes = {
  rod1 = {
	color = { 1, 0, 0},
	mesh_center = {0, 0, -rod_length/2},
	dimensions = { 0.2, 0.2, rod_length},
	src = "unit_cube.obj"
  }
}

model = {
  configuration = {
	axis_right = { 1, 0, 0 },
	axis_front = { 0, 1, 0 },
	axis_up =    { 0, 0, 1 },
  },

  frames = {
	{
	  name = "segment1",
	  parent = "ROOT",
	  visuals = { meshes.rod1 },
	  joint = {{ 1, 0, 0, 0, 0, 0 }},
	  joint_frame = {
		E = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}
	  }
	}
  }
}

return model
0, 0
1, 1.57
2, 3.14
3, 4.73
4, 6.28

I was testing the directions of movement. Using this model as is, I was expecting the movement to be in the X rotation direction, but it does not. Here's a few examples.

Using

# correct, moving the positive x direction
	axis_right = { 1, 0, 0 },
	axis_front = { 0, 1, 0 },
	axis_up =    { 0, 0, 1 },
 joint = {{ 0, 0, 0, 1, 0, 0 }},

gives me a motion to the right-down direction, telling me that is the +X axis direction.

video_config100_joint000100.mp4

So I would expect the following

# incorrect, expecting counterclockwise movement
	axis_right = { 1, 0, 0 },
	axis_front = { 0, 1, 0 },
	axis_up =    { 0, 0, 1 },
 joint = {{ 1, 0, 0, 0, 0, 0 }},

to rotate by right hand rule around the +X direction. Instead, it incorrectly gives me the opposite motion:

video_config100_joint100000.mp4

The following are videos corresponding to flipping the axes direction by Z by 180 deg (so we are still respecting right hand rule global frame), as well as only mirroring the global X axis.

# correct, moving in the positive x direction
	axis_right = { -1, 0, 0 },
	axis_front = { 0, -1, 0 },
	axis_up =    { 0, 0, 1 },
 joint = {{ 0, 0, 0, 1, 0, 0 }},
video_config-1-11_joint000100.mp4
# incorrect, expecting clockwise movement
	axis_right = { -1, 0, 0 },
	axis_front = { 0, -1, 0 },
	axis_up =    { 0, 0, 1 },
 joint = {{ 1, 0, 0, 0, 0, 0 }},
video_config-1-11_joint100000.mp4
# correct, moving in the positive x direction
	axis_right = { -1, 0, 0 },
	axis_front = { 0, 1, 0 },
	axis_up =    { 0, 0, 1 },
 joint = {{ 0, 0, 0, 1, 0, 0 }},
video_config-111_joint000100.mp4
# correct, moving CW
	axis_right = { -1, 0, 0 },
	axis_front = { 0, 1, 0 },
	axis_up =    { 0, 0, 1 },
 joint = {{ 1, 0, 0, 0, 0, 0 }},
video_config-111_joint100000.mp4

Failed attempt to load non-existent 'user-desktop-symbolic.svg'

On start application attempts to load an SVG file that is not present in the source tree.

ui_RenderImageDialog.h:108

icon.addFile(QString::fromUtf8("../../../../../../../usr/share/icons/Adwaita/scalable/places/user-desktop-symbolic.svg"), QSize(), QIcon::Normal, QIcon::Off);

Doesn't seem to impact the functionality as Qt fails somewhat gracefully and writes the error message to the terminal.

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.