Giter Site home page Giter Site logo

raisimtech / raisimlib Goto Github PK

View Code? Open in Web Editor NEW
330.0 14.0 88.0 1.99 GB

Visit www.raisim.com

Home Page: http://www.raisim.com

License: Other

CMake 1.03% C 32.51% Makefile 0.05% C++ 55.44% Python 0.82% MATLAB 0.06% Shell 0.01% ASP.NET 10.06% PowerShell 0.02%

raisimlib's Introduction

RaiSim

RaiSim is a physics engine for robotics and artificial intelligence research that provides efficient and accurate simulations for robotic systems. We specialize in running rigid-body simulations while having an accessible, easy to use C++ library.

IMAGE ALT TEXT HERE

News

Closed-loop system simulation is now available! Check out the minitaur example

Dependencies

- Eigen3

Ubuntu
sudo apt install libeigen3-dev

Windows

Install desired release here and unzip file at C:\Program, files for better discoverability.

- CMake

Install version > 3.10 here.

- Visual Studio 2019

Install here, make sure to install C++ module by checking the box during installation.

Installation

Further documentation available on the RaiSim Tech website.

Features

  • Supports free camera movement
  • Allows the recording of screenshots and recordings
  • Contact and collision masks
  • Materials system to simulate different textures
  • Height maps to create different sytles of terrain
  • Ray Test to create collision checkers

Troubleshooting

  • Ensure that all versions of dependencies fit the documentation. etc.(Visual Studio 2019, CMake verson > 3.10)
  • If run into problem with executing into the raisimUnity.x86_64 file, ensure that your graphics card driver is compatible with current graphics card. (Cannot use the default open-source graphics card driver nouveau)
  • Make sure to use raisimUnity natively and not on a docker.
  • If using Linux, install minizip, ffmpeg, and vulkan.
  • If drivers don't support vulkan, use raisimUnityOpengl instead of raisimUnisty. Found in raisimUnityOpengl directory.
  • Make sure to set environment variable to $LOCAL_INSTALL when installing raisim.

License

You should get a valid license and an activation key from the RaiSim Tech website to use RaiSim. Post issues to this github repo for questions. Send an email to [email protected] for any special inquiry.

Supported OS

MAC (including m1), Linux, Windows.

raisimlib's People

Contributors

cperez1703 avatar isgeles avatar jhwangbo avatar matheecs avatar mathieu-geisert avatar raisim avatar skoo1 avatar ultrafrog2012 avatar wxmerkt avatar

Stargazers

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

Watchers

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

raisimlib's Issues

setExternalForce does not work under Integration scheme RUNGE_KUTTA_4

When using the integration scheme RUNGE_KUTTA_4, external forces don't work. I tried it in my own simulation and with one of the examples "wheeledRobot.cpp". With the other integration schemes it works fine. I also made sure to put the external force into the integration loop.

Friction coefficient set in the xml does not match the simulation exactly

It seems that the friction coefficients set in the xml does not match the simulation exactly: in the source code attached, for a box of 1 kg mass, (0,0,-9.81) gravity and 0.5 friction coefficient. If an external force of (4.9,0,0) N is applied to the object. It should not move, as it is smaller than 1 * 9.81 * 0.5 = 4.905 N. However, it moves in the simulation. Interestingly, if I set the external force to be (4.85, 0, 0) N. It completely stopped moving. Is this an expected behavior? Here is the source code:
RaisimAerialInteraction.zip

Reaction force at joints

Thanks for providing free academic license of the excellent and fast dynamics solver.

I'm wondering if there is a plan to implement functions for obtaining reaction forces at joints.

-SK

raisimUnityOpenGL failed to record video

Hello.

I am trying to migrate my old code to this new version of raisimlib. The origin version of raisimUnity works well on my local machine with GTX 1080, but when I move to the opengl version of raisimUnity, the video recording function failed. It only generate a 262k small file.

My OS is ubuntu 1804 and everything works fine when using the old raisimUnity and even older raisimOgre.

libraisimMine.so: Illegal instruction (core dumped)

Hi,

I am trying to install Raisim on a desktop computer and always end up with "Illegal instruction (core dumped)" (using my own programs and all the Raisim examples). The same computer was able to run Raisim with Ubuntu 18.04 PopOS (when used by Siddhant), but I erased everything and did a fresh install of Ubuntu 20.04 then tried to reinstall Raisim and have been stuck with this error since then.

There is what I get from gdb:

mgeisert@ORI-DRS-XPS-8930:~/raisim_ws/src/raisim/build$ gdb ./examples/primitives 
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./examples/primitives...
(gdb) r
Starting program: /home/mgeisert/git/raisimLib/build/examples/primitives 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x00007ffff7065601 in std::vector<unsigned char, std::allocator<unsigned char> >::vector(std::vector<unsigned char, std::allocator<unsigned char> > const&) ()
   from /home/mgeisert/raisim_ws/src/raisim/raisim/linux/lib/libraisimMine.so
(gdb) x /3i $pc
=> 0x7ffff7065601 <_ZNSt6vectorIhSaIhEEC2ERKS1_+49>:	vpbroadcastq %rcx,%xmm0
   0x7ffff7065607 <_ZNSt6vectorIhSaIhEEC2ERKS1_+55>:	mov    %rbx,0x10(%rbp)
   0x7ffff706560b <_ZNSt6vectorIhSaIhEEC2ERKS1_+59>:	vmovups %xmm0,0x0(%rbp)

There is the computer description:
GeForce RTX 2080 Ti/PCIe/SSE2 / NVIDIA Corporation TU102
Ubuntu 20.04.2 LTS (64bits)
Intel® Core™ i7-8700K CPU @ 3.70GHz × 12

And if this can help, here is the more precise description of the cores:

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 158
model name      : Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
stepping        : 10
microcode       : 0xde
cpu MHz         : 4233.376
cache size      : 12288 KB
physical id     : 0
siblings        : 12
core id         : 0
cpu cores       : 6
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_t
sc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 s
se4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexprio
rity ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts 
hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
vmx flags       : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple shadow_vmcs pml ept_mode_based_e
xec
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit srbds
bogomips        : 7399.70
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual

Thank you,
Best,
Mathieu.

Illegal Instructions in Ubuntu 20.04 Virtual Machine

I had the raisimLib (together with the raisimOgre) installation working with a clone from January. Now, I pulled the most recent version, installed everything from scratch and I get the following error as soon as I import raisimpy (without doing anything else):

python -c "import raisimpy as raisim"

Then I get the following error:

Illegal instruction (core dumped)

I have a very recent CPU (and the raisimLib is running on the same system natively on macOS) and I check if the avx and avx2 instructions are available in the Virtual Machine as well:

more /proc/cpuinfo | grep flags
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave **avx** f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 **avx2** smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec dtherm arat pln pts

raisimGymTorch

HI
In raisimTech/raisimlib there is one Package (folder name as raisimGymTorch) which provided with setup.py, CMakeLists.txt, init.py, README.md and LICENSE file. in the README.md it was stated there is no need to compile here. This only provides a header file for an environment definition.
In the same file there are two instructions which states

  1. Compile raisimgym: python setup develop
  2. run runner.py of the task (for anymal example) : cd raisimGymTorch/env/envs/rsg_anymal && python ./runner.py

For the 1 step of compilation I did the following

python3 setup.py install --CMAKE_PREFIX_PATH $LOCAL_BUILD --env /raisimGymTorch/env/envs/rsg_anymal

But the compilation failed with following error like

errorL: option --env not recognized

If I compile without --env parameter it works fine but when i try to run the code examples runner by following the path

then it give me error like

Module NotFoundError: No module name 'raisimGymTorch'

How I resolve this issue

Get contact force between objects

I'm trying to find the contact force between two objects.

The docs sample is already very helpful:

for(auto& contact: anymal->getContacts()) {
    if (contact.skip()) continue;

    std::cout << "Contact impulse in the world frame: " <<contact.getContactFrame().e() * contact.getImpulse()->e() << std::endl;
}

But the contact magnitude is as impulse. I'm not familiar with this, but a quick search shows this is probably part of impulse based contact. Is there an easy way to convert this to a contact force in Newtons?

I'm guessing we need to define by some amount of time. Is this the simulation timestep?

Relating joint actuation torque to generalized torque

Like a typical robot, mine has a floating base and is therefore underactuated. Moreover, a joint torque does not directly map to a generalized force, since a joint torque will pull on one joint coordinates but push against another.

If we imagine a box with a single rotating stick, we would have the following:

equation

Some actuator jacobian relates the actuator torques to generalized torques.

Is it possible to distinguish between actuated and passive degrees-of-freedom in a URDF robot?
And would it be possible to find such an actuator jacobian? Or write actual actuation forces directly?
I guess this question is about URDF as much as RaiSim itself.

Thank you in advance!

ImportError: No module named raisimGymTorch.env.bin when running RaisimGymTorch

Hi there,

Thanks for your work and license. I can successfully run the examples provided in the repo.

However, when I tested RaisimGymTorch, an error came out. So, I have a few questions about raisimGymTorch to ask:

  1. Do I have to run python setup.py develop using Python 2? Because when I used Python 3, I had the error undefined symbol: _Py_ZeroStruct

  2. When I run everything with Python 2 and run python raisimGymTorch/env/envs/rsg_anymal/runner.py, I got the error

Traceback (most recent call last):
  File "/home/shuo/raiSim_ws/raisimLib/raisimGymTorch/raisimGymTorch/env/envs/rsg_anymal/runner.py", line 4, in <module>
    from raisimGymTorch.env.bin import rsg_anymal
ImportError: No module named raisimGymTorch.env.bin

I tried to append the package's path in the code but still got the error.

Could you please let me know how should I fix this?

Best,
Shuo

Mutiple fixed-base articulated systems

Hi,
I am trying to set up a simulation where there are two fixed-base objects. And it seems that this leads to problem that child links output NaN position, this would not happen if I have only one fixed-base objects in my simulation. Here is a example of the fixed-base system

<?xml version="1.0"?> 
<robot name="simplePlane" xmlns:xacro="http://www.ros.org/wiki/xacro">
    <!-- Colors --> 
    <material name="grey"> 
        <color rgba="0.91 0.925 0.945 1"/>
    </material>

    <material name="blue">
        <color rgba="0.0 0.0 0.8 1.0"/>
    </material>

    <!-- Plane -->
    <link name="base_link">
        <visual> 
            <geometry> 
                <box size="0.003 5.0 5.0"/>
                <origin rpy="1.57075 0 0" xyz="1 0 0"/>
            </geometry>
            <material name="blue"/>
        </visual>
        <collision> 
             <geometry> 
                <box size="0.003 5.0 5.0"/>
                <origin rpy="1.57075 0 0" xyz="1 0 0"/>
            </geometry>
        </collision> 
        <inertial> 
            <mass value="0"/>
            <inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
        </inertial> 
    </link> 

    <link name="world" />

     <joint name="world_joint" type="fixed">
        <parent link="world" />
        <child link = "base_link" />
        <origin xyz="1.0 0.0 0." rpy="0.0 0.0 0.0" />
     </joint>


     <link name="virtual_link">
        <visual> 
            <geometry> 
                <box size="1 1 1"/>
                <origin rpy="1.57075 0 0" xyz="3 0 2.5"/>
            </geometry>
            <material name="grey"/>
        </visual>
        <collision> 
             <geometry> 
                <box size="1 1 1"/>
                <origin rpy="1.57075 0 0" xyz="3 0 2.5"/>
            </geometry>
        </collision> 
        <inertial> 
            <mass value="0"/>
            <inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
        </inertial> 
    </link> 

    <joint name="base_virtual" type="revolute">
        <parent link="base_link" />
        <child link = "virtual_link" />
        <axis xyz="0 0 1"/>
        <limit effort="0.0" lower="0" upper="-0" velocity="1000.0"/>
        <origin xyz="0.003 5.0 5.0" rpy="0.0 0.0 0.0" />
     </joint>

</robot>

So if I have two of these objects in the simulation, and the position of the virtual_link would be NaN, whereas the position of the base_link, which is directly linked to the world is fine. Is this posible? Or is there something wrong with the fixed-base urdf? I tried to find an example of fixed base urdf in the raisim documentation. Thanks!

Fix C++11 compatibility

The header raisim/math/Matrix.hpp breaks C++11 build because it uses C++14 auto return type deduction.

The following change would resolve this issue:

diff --git a/raisim/linux/include/raisim/math/Matrix.hpp b/raisim/linux/include/raisim/math/Matrix.hpp
index 686c09b..7305d02 100644
--- a/raisim/linux/include/raisim/math/Matrix.hpp
+++ b/raisim/linux/include/raisim/math/Matrix.hpp
@@ -116,7 +116,7 @@ class Mat : public MatExpr<Mat<n, m>> {
     return zero;
   }
 
-  auto transpose() { return Transpose<Mat<n,m>>(*this); }
+  Transpose<Mat<n,m>> transpose() { return Transpose<Mat<n,m>>(*this); }
 
   inline RowRef<Mat<n, m>, m> row(size_t r) { return RowRef<Mat<n,m>, m>(*this, r); }
   inline const RowRef<Mat<n, m>, m> row(size_t r) const { return RowRef<Mat<n,m>, m>(*this, r); }

'omp.h' file not found when running setup.py in raisimGymTorch on macOS.

Hello,

I've been experimenting with RaiSim over the last week, I appreciate the work you've put in and the permissive academic license. On linux I've gotten everything to work fine, however I have run into an issue when using raisimGymTorch on macOS. raisimLib builds fine and I can run examples, the issue is when I run "python setup.py develop" in raisimGymTorch.

The relevant part of the error message:

[ 33%] Building CXX object CMakeFiles/rsg_anymal.dir/raisimGymTorch/env/raisim_gym.cpp.o
In file included from /Users/sgillen/work/external/raisim/workspace/raisimLib/raisimGymTorch/raisimGymTorch/env/raisim_gym.cpp:8:
In file included from /Users/sgillen/work/external/raisim/workspace/raisimLib/thirdParty/pybind11/include/pybind11/eigen.h:36:
/usr/local/include/eigen3/Eigen/Core:266:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/rsg_anymal.dir/raisimGymTorch/env/raisim_gym.cpp.o] Error 1
make[1]: *** [CMakeFiles/rsg_anymal.dir/all] Error 2
make: *** [all] Error 2

The compiler being used here is the default apple clang for macOS 11.0.1 (this is confirmed by looking at CmakeCache, clang++ --version returns:

Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: x86_64-apple-darwin20.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I don't think python is the problem, but this is with Python 3.6.9 installed via anaconda.

I've been seeing mixed messages on the state of openMP support with the built in MacOS utilities. Do you have any insight into this? Is there a dependency I am missing? Thanks very much.

Weird behaviour of raisim::world::rayTest

@jhwangbo I experienced some weird behaviour for some cases when using the raisim::world::rayTest method for my raycasting. In this example I am raycasting from a vantage point one meter above ground in the center of the grid. In the first screenshot you can see the result I received with the code build on raisim. In the second screenshot you can see the result I would expect to see (the elevation of the rectangle in the upper-left is at 10m and the rest of the ground is flat at 0m) and which I received after writing my own rayTest code. I am not sure, maybe I used parameters for the raisim::world::rayTest method which failed in some edge-cases, but it was hard for me to debug without seeing the source code.

Result of raycasting using raisim::world::rayTest (https://github.com/mstoelzle/grid-map-raycasting/blob/raisim/src/main.cpp):
Screenshot 2021-02-12 at 16 04 29

Result of raycasting using my own rayTest code (https://github.com/mstoelzle/grid-map-raycasting/blob/master/src/main.cpp):
Screenshot 2021-02-12 at 21 22 31

Speed tuning

Hi,

First, thanks for the simulation and the academic license!

I am targeting high speed simulation. The initial results are already better than other simulators without any fine tuning.
Nevertheless, I cannot reach the throughput of benchmark/anymal.cpp which gives a ca. 106 KHz simulation.

In my scenario, I am using a fixed based manipulator with 7 dofs. I have tried removing also collision between pair of links but I still get the simulation at around 25 KHz. Here a snippet of the code:

    // no plane to remove additional collisions
    world.setTimeStep(dt);
    world.setERP(0.,0.);
    auto arm = world.addArticulatedSystem(robot_description_, "/");
    arm->setControlMode(raisim::ControlMode::PD_PLUS_FEEDFORWARD_TORQUE);
    
    // use simpler integrator
    arm->setIntegrationScheme(raisim::ArticulatedSystem::IntegrationScheme::TRAPEZOID);
    arm->setPdGains(joint_p_gain, joint_d_gain);
    arm->setGeneralizedForce(Eigen::VectorXd::Zero(panda->getDOF()));

    // remove collisions between links
    std::vector<int> bodyIdxs;
    for (const auto& body_name : panda->getBodyNames()){
      bodyIdxs.push_back(panda->getBodyIdx(body_name));
    }

    for (const auto idx1 : bodyIdxs){
      for (const auto idx2 : bodyIdxs){
        panda->ignoreCollisionBetween(idx1, idx2);
      }
    }

  // loop
 while(true){
  auto start = ....
  world.integrate();
  auto end = ....
  // measure average time step
}

This discrepancy in performance looks quite fishy given that anymal certainly undergoes more collisions detections and is not tuned (at least from what I see in the source code).

Furthermore, do you have any suggestion to maximize the simulation speed in a RL-type of setup where multiple episodes are run parallely for a short time horizon?
Thanks!

Load a mujoco xml file

Hi can you add some content in the documentation about how to import an articulated system from an xml file in mujoco format? This may seem important when you are using models formerly created for mujoco.

Collision between STATIC object and fixed-base object

It seems that when there is a collision between a fixed-base object and the STATIC object, the position outputs NaN. Is this possible? I tried to make the fixed-base object a float-base object. Then the collision works fine.

about musculoskeletal example

When I checked raisim website, there is a very interesting example of Biomechanical simulation.

Biomechanical simulation, created by Young-Jun Koo, PhD and Seungbum Koo, PhD at Musculoskeletal BioDynamics Lab, KAIST.

I wonder if there is plan to add it to example, or do you know if this project is open source?

Model investigation example

Back with more 🙃
A suggestion this time: getting your URDF robot model right can be kind of tricky. And investigating if your joints behave as desired is not trivial.
I would much like to have a RaiSim application where I can:

  • Load my robot (or entire world)
  • Pause/play simulation
  • View the values of the generalized coordinates
  • Change the gen. coordinates when paused
  • View/change the gen. torques

Much like MuJoCo's simulate example:

This would be the perfect way to benchmark a developed URDF file.

I'll see if I can make something like this, but I'm not yet familiar with Ogre.

Wrong relationship between angular velocity and roll, pitch, yaw

Hello,

I use the following code to get the roll, pitch, and yaw. I think they should be angular positions between robot coordinate and world coordinate.

            q_ = anymal_->getGeneralizedCoordinate().e();
            Eigen::Matrix<double, 4, 1> quat = q_.segment<4>(3);
            double r, p, y;
            Math::MathFunc::QuattoEuler(quat, r, p, y);

And I calculate angular velocity with respect to world coordinate and robot coordinate using the following code. Turned out they are not the derivative of roll, pitch, and yaw. Did I make some mistakes?

            u_ = anymal_->getGeneralizedVelocity().e();
            R_b_ = Math::MathFunc::quatToRotMat(quat);
//          auto bodyAngularVel = R_b_.transpose() * u_.template segment<3>(3);
            auto bodyAngularVel = u_.segment<3>(3);

Get and/or clear current external forces and torques

Is there a way to find which external forces and torques are active on an ArticulatedSystem, set by setExternalForce() and setExternalTorque()? And a way to reset them all?

An additional comment: so the behaviour of setExternalForce() is different from setGeneralizedForce(), in the sense that the forces do not persist. I suspect they are being reset on an integration? It might be nice to have it mentioned in the documentation explicitly.

Thank you!

Support for Windows OS

As it is indicated in the license request form, there is an option "Machine ID for Windows". When do you plan to release raisim for windows?

Missing world.addCustomWire for build on macOS

For versions of the master branch starting with commit ccd0403, I get the following error while making the install:

Scanning dependencies of target primitives
[ 18%] Building CXX object examples/CMakeFiles/rayDemo2.dir/src/server/rayDemo2.cpp.o
[ 20%] Building CXX object examples/CMakeFiles/rayDemo.dir/src/server/rayDemo.cpp.o
[ 22%] Building CXX object examples/CMakeFiles/newtonsCradle.dir/src/server/newtonsCradle.cpp.o
[ 25%] Building CXX object examples/CMakeFiles/primitives.dir/src/server/primitives.cpp.o
/Users/maximilianstoelzle/Documents/ethz/MT/raisimLib/examples/src/server/newtonsCradle.cpp:104:22: error: no member named 'addCustomWire' in 'raisim::World'
  auto wire7 = world.addCustomWire(pin7, 0, {0,0,0}, anymalB, 0, {0., 0, 0}, 2.0);
               ~~~~~ ^
1 error generated.
make[2]: *** [examples/CMakeFiles/newtonsCradle.dir/src/server/newtonsCradle.cpp.o] Error 1
make[1]: *** [examples/CMakeFiles/newtonsCradle.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 27%] Linking CXX executable rayDemo
[ 29%] Linking CXX executable primitives
[ 29%] Built target rayDemo
[ 29%] Built target primitives
[ 31%] Linking CXX executable rayDemo2
[ 31%] Built target rayDemo2
make: *** [all] Error 2

Error in file (urdf) import

0D124BB4D3EE2A29AFD46D6E1D192E01

I exported the Soildword model as an URDF file through the sw_urdf_exporter plug-in. Error when running: Mesh collision bodies must be in an obj format .

This is the exported file :bouncing_balance_car.SLDASM.zip

I don't know if this export way will work with Raisim or if it needs to be modified to use it . This URDF file can be used in V-Rep, but not in Raisim.

I really hope to get your advice and help me solve the problem . Thank you very much .

Spurious contact with large depth

Hi,
I'm investigating a strange issue where sometimes collisions with a large penetration appear and disappear very quickly. I suspect this is an issue with my heightmap or the robot model, but I need a bit of help for debugging. At each iteration of my algorithm, I'm checking the current state for strange collisions and then print the following snippet:

std::cout << "Contact depth " << contact.getDepth() << " colliding with "
                  << world_.getObject(contact.getPairObjectIndex())->getName() << " at world position "
                  << contact.getPosition().e().transpose() << " while anymal position is at (raisim_q): " << raisim_q.transpose()
                  << " and ground height at: " << heightMap_->getHeight(contact.getPosition().e()(0), contact.getPosition().e()(1))
                  << std::endl;

Most of the time everything is fine, but sometimes large contact penetrations are occuring, e.g.:

Contact depth -0.998189 colliding with  at world position    0.488771   -0.388471 -0.00393607 while anymal position is at (raisim_q):   0.265084  -0.124508   0.554875   0.982398 0.00403822 0.00967577  -0.186507  -0.228771    0.67993  -0.946103    0.19076   0.729859  -0.906762  -0.472449  -0.581529   0.812443   0.592239  -0.600427   0.676604 and ground height at: -0.00393607

The state of the robot (anymal) looks fine and the collision position is where I expect the foot to be. What's striking is that the contact depth is so deep. Two questions

  • Is the contact object correctly filled or is this part of the code untested?
  • Why is the name of the colliding object an empty string?

Documentation on world XML files

It's mentioned in https://raisim.com/sections/WorldSystem.html#world that you can also create a world through an XML file. But I can't find any reference on how create such an XML file.

I realise you can export a world to an XML too. If that's the only intended use, it might be good to mention that too.

(And while I have your attention, maybe creating a RaiSim forum would be useful? That might provide a better knowledge database than the issues list.)

Thank you!

About invalid position detected

Hey,

I kindly wonder in which case it will trigger:

An invalid position detected. This is most likely due to an invalid control command.
terminate called without an active exception
Aborted (core dumped)

It will terminate the training process, which really cause destruction.

Thx!
Fan

visualization with mesh files in raisimUnity

Is there anything to consider with using mesh files in raisimUnity? When I try to visualize the the hummingbird mesh from the previous raisimGym example with raisimOgre, only three of four arms of the base are visualized in raisimUnity. The fourth arm has still physical properties, but is just not visible.

Screenshot-2020-11-05-03-03-29

Also changing the colour didn't work out for me. I have set the colour of the mesh according to the anymal.urdf file:

  <link name="hummingbird/base_link">
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="../meshes/hummingbird.dae" scale="1 1 1"/>
      </geometry>
      <material name="blue">
        <color rgba="0.0 0.0 0.8 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="0.1 0.1 0.12"/>
      </geometry>
  </link>

  <joint name="hummingbird/base_joint" type="fixed">
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <parent link="hummingbird/base_link"/>
    <child link="hummingbird/base_link_inertia"/>
  </joint>

  <link name="hummingbird/base_link_inertia">
    <inertial>
      <mass value="0.68"/>
      <!-- [kg] -->
      <origin xyz="0 0 0"/>
      <inertia ixx="0.007" ixy="0.0" ixz="0.0" iyy="0.007" iyz="0.0" izz="0.012"/>
    </inertial>
    </collision>
  </link> 

Segfault during collision

Hi,
in my current simulation, when two simple meshes are in contact, I get a segmentation fault. I have updated raisim to the latest version. I post both a picture showing the aspect of the meshes and the segfault traceback.

I thank you in advance for the help.

double free or corruption (fasttop)

Thread 12 "manipulation_co" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdbfff700 (LWP 22303)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff615d921 in __GI_abort () at abort.c:79
#2  0x00007ffff61a6967 in __libc_message (action=action@entry=do_abort, 
    fmt=fmt@entry=0x7ffff62d3b0d "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff61ad9da in malloc_printerr (
    str=str@entry=0x7ffff62d57d0 "double free or corruption (fasttop)") at malloc.c:5342
#4  0x00007ffff61b50f4 in _int_free (have_lock=0, p=0x55555620e920, av=0x7ffff6508c40 <main_arena>)
    at malloc.c:4260
#5  __GI___libc_free (mem=0x55555620e930) at malloc.c:3134
#6  0x00007ffff343e4c6 in IceCore::Container::Resize(unsigned int) ()
   from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#7  0x00007ffff34240c2 in Opcode::OBBCollider::_Collide(Opcode::AABBNoLeafNode const*) [clone .localalias.40] () from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#8  0x00007ffff3423c09 in Opcode::OBBCollider::_Collide(Opcode::AABBNoLeafNode const*) [clone .localalias.40] () from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#9  0x00007ffff3423bf2 in Opcode::OBBCollider::_Collide(Opcode::AABBNoLeafNode const*) [clone .localalias.40] () from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#10 0x00007ffff3423bf2 in Opcode::OBBCollider::_Collide(Opcode::AABBNoLeafNode const*) [clone .localalias.40] () from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#11 0x00007ffff3423bf2 in Opcode::OBBCollider::_Collide(Opcode::AABBNoLeafNode const*) [clone .localalias.40] () from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#12 0x00007ffff3423c09 in Opcode::OBBCollider::_Collide(Opcode::AABBNoLeafNode const*) [clone .localalias.40] () from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#13 0x00007ffff3423bf2 in Opcode::OBBCollider::_Collide(Opcode::AABBNoLeafNode const*) [clone .localalias.40] () from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#14 0x00007ffff3423bf2 in Opcode::OBBCollider::_Collide(Opcode::AABBNoLeafNode const*) [clone .locala---Type <return> to continue, or q <return> to quit---
lias.40] () from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#15 0x00007ffff34522b5 in Opcode::OBBCollider::Collide(Opcode::OBBCache&, IceMaths::OBB const&, Opcode::Model const&, IceMaths::Matrix4x4 const*, IceMaths::Matrix4x4 const*) ()
   from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#16 0x00007ffff3470ead in dCollideBTL(dxGeom*, dxGeom*, int, dContactGeom*, int) ()
   from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#17 0x00007ffff6af97a5 in nearCallback(void*, dxGeom*, dxGeom*) [clone .lto_priv.165] ()
   from /home/giuseppe/raisim_ws/build/lib/libraisim.so
#18 0x00007ffff34b0ae3 in dxHashSpace::collide(void*, void (*)(void*, dxGeom*, dxGeom*)) ()
   from /home/giuseppe/raisim_ws/build/lib/libraisimODE.so
#19 0x00007ffff6af3cbe in raisim::World::integrate1() ()
   from /home/giuseppe/raisim_ws/build/lib/libraisim.so
#20 0x00007ffff6af48b9 in raisim::World::integrate() ()
   from /home/giuseppe/raisim_ws/build/lib/libraisim.so
#21 0x00007ffff7b803c9 in manipulation::PandaRaisimDynamics::step (this=0x555556491da0, u=..., 

raisim_bug

Request for SSH forwarding functionality for raisimUnity (remote simulator process & local raisimUnity)

Thank you for maintaining this awesome library. Have used it for a while, I want to discuss a common use case that is not supported in current version.

Usually, computation / training of a robot in raisim is done on a remote server which is connected by SSH from local machine. In order to use raisimUnity to visualize the robot's locomotion, I should either (1) first download the related files and data to the local machine, and then launch the local raisimUnity, which is a hassle; or (2) use X11 forwarding of raisimUnity that is launched on the remote server, which results in sluggish visualization due to high bandwidth requirement.

Instead, SSH port forwarding seems like a better option, since raisimUnity and the simulator process is connected by using TCP/IP. I tried this setting with a remote simulator process and a local raisimUnity, but I got the following error message in raisimUnity regarding failed resources loading:

image

Disable contact at runtime

Is it possible to disable contact for an object or all objects at runtime? Basically I would like to turn my robot into a ghost that's not bothered by other objects.

Maybe by changing the collision group? I couldn't find anything about this in the API.

Thank you!

new master branch fails in Ubuntu

Hi Jemin,

I update to the latest master branch, all compiles well.
But when training with runner.py, it fails with the output:

Traceback (most recent call last):
File "raisimGymTorch/raisimGymTorch/env/envs/rsg_anymal/runner.py", line 2, in <module>
from raisimGymTorch.env.RaisimGymVecEnv import RaisimGymVecEnv as VecEnv
ModuleNotFoundError: No module named 'raisimGymTorch.env'

My system is Ubuntu 18.04 and it works well with Dec 9, 2020's version.
I failed to find the reason. Wonder if you have the similar case?

THX.
Fan

Constant mass assumption when solving newton's second law

Hi There

I was wondering (am currently testing this out myself but thought I'd make sure): does raisim make a constant mass assumption when integrating Newton's second law for the dynamics of SingleBodyObject's?

In other words, which of the differential equations I list in the attached picture below is raisim solving when an object is in free motion?

raisim_integration

wire with custom force generation

I can see that there are StiffLengthConstraint and CompliantLengthConstraint in the library.
Both of them have fixed parameters and their forces are calculated from the fixed parameters.
I am wondering if you can make a wire whose force is computed by a custom function so that we can control the force depending on dynamic conditions? It would be nice for me in making a human ligament structures in the joints.
-SK

'Wrong Message' Errors Occured when using RaiSimUnity

Screenshot from 2020-11-19 20-20-10
Hi there.
When using the RaisimUnity to connect to the "anymals" example in the new raisimLib, the client of raisimUnity seems unable to connect to the Server, and a error message showed up in the GUI of RaisimUnity (as the Pic). It says 'the server sends a wrong message.' Also, the server process in the terminal shows "disconnected for 0" every time I click "OK" in the GUI, and the same error shows up again in GUI after a blink.
What does that mean? And how can I fix that?
Hope to be replied, thanks.

Example of "rayTest" use

Hello,
Could it be possible to provide an example using the function "rayTest" for ray cast measurement ?

Best regards

Raisim License for Multiple Computers

Thanks for the new release!

With the new license scheme, are there any options available for a license that enables us using raisim in multiple computers? An example use case would be a cluster where we compile in one PC and then run our programs in multiple different PCs.

Thanks in advance!

Mimic Joint Support

Hello,
on the old github page you were stating that mimic joints are soon going to be supported. Are there any updates on that feature?

unable to get raisimUnity to work with raisimGymTorch in Linux

Hi,

I tried launching the raisimUnity executable in the linux folder, but it doesn't seem to do anything (doesnt launch / doesnt crash either). I tried downloading the binaries from the raisimUnity repository. The linux executable from there successfully launches, but when I try to connect it to the raisimGymTorch example, it seems to give a TCP packet error, and the raisimGymTorch runner.py example says "disconnected 0".

It would also be super useful to have an example code to just load and visualize a pretrained policy, because i ran into some troubles trying to run raisimUnity headless.

Get computed dynamics (generalized accelerations)

Just trying out Raisim to see if it fits my project. Apologies if this is not the right place to ask questions.

Is it possible to get the generalized accelerations (i.e. the computed forward dynamics of the system) of a simulation?

I want to use a simulator not for continuous integration, but as a physics back-end that computes unrelated instances.

Are quaternions automatically normalized?

Hi, I'm approaching system dynamics and dynamics partial derivatives through finite-differences approximations. In the process I give small perturbations to the generalized coordinates.
I would then also perturb quaternion elements. Should I take care to re-normalize the quaternions inside the generalized coordinates vector? Or is this done automatically?

Is there a convenient way to find the first index of all quaternions inside the generalized coordinates?
I guess we can iterate over all joints, find floating and ball joints and use JointRef::getIdxInGeneralizedCoordinate().

Inconsistent bouncing behaviour between fixed-base object and floating base object

I have observed an inconsistent bouncing behavior between fixed-base object and floating base object: for the same pair of fixed-base object and floating-base object, the bouncing behavior seems inconsistent. If the fixed-base object hit the floating-base object from the side, there seems to be no bouncing effect at all (although the restitution coefficient is set to be 0.95 between the pair). If the fixed-base object hit the floating-base object from above, then the bouncing effect seems to be fine. The source code can be found here:
RaisimAerialInteraction.zip

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.