Coder Social home page Coder Social logo

raisimlib's Introduction

The license associated with the files in this repo will expire on Nov 1st, 2020. The latest version is available at www.raisim.com.

raisimlib's People

Contributors

eastskykang avatar inkyusa avatar jhwangbo avatar mygao avatar tomlankhorst avatar ultrafrog2012 avatar vastsoun 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raisimlib's Issues

Questions on function getGeneralizedForce()

Hello. In function getGeneralizedForce(), it returns a vector which contains the torques on each joints. But how can I know the mapping relation between each joints and members in the vector. Does it depend on the link-tree generated by the urdf?

help on urdf file

Hello, thanks for the work.

I want to simulate a humanoid using raisim, but encounter a strange problem. After loading the urdf, the 'setState' is ok, kinematic part seems fine, playing mocap data looks no problem. But when call 'world.integrate()' whether with pd or not, the joint configurations are always 'nan' (testing on lots of initial states), if just call 'world.integrate1()' and run 'getInverseMassMatrix' returns 'Nan' array alreadly while the 'MassMatrix' looks reasonable and is invertible.

After doing some trials, found something related to the urdf, joint/link definition seems to be the reason, change 'xyz' on some joint origin or mass/inertia on link to bigger values (which is apparently wrong value) may not encounter the problem. Don't know why, its this related to the 'unrealistic internal collisions' ? Or how do i make sure a right difinition?

The urdf comes from the bullet example with link inertia computed, and no big value diff except lots of 'spherical' joint comparing with the raisim anymal example urdf, same file on pybullet, things are ok.


playing mocap:
image

a small test script:

#include "raisim/World.hpp"
int main(){
    raisim::World world;
    auto robot = world.addArticulatedSystem("../../data/characters/humanoid.urdf");
    auto ground = world.addGround();
    std::cout<<robot->getGeneralizedCoordinate()<<std::endl;
    world.setTimeStep(0.002);
    world.integrate();
    std::cout<<robot->getGeneralizedCoordinate()<<std::endl;
}

Below is part of the humanoid.urdf file, borrowed from the 'bullet' repository example, when loading this, world.integrate produce 'nan's but change 'right_hip' joints' origin to origin rpy="0 0 0" xyz="0 1 0.085" no 'nan' s.

<?xml version="1.0"?>

<robot name="dumpUrdf">

	<link name="base">
	</link>
	
	<!-- Root  -->
	<link name="root">
		<inertial>
			<origin rpy = "0 0 0" xyz = "0.000000 0.070000 0.000000" />
			<mass value = "12.000000" />
			<inertia ixx = "0.03888" ixy = "0" ixz = "0" iyy = "0.03888" iyz = "0" izz = "0.03888" />
		</inertial>		
		<collision>
			<origin rpy = "0 0 0" xyz = "0.000000 0.070000 0.000000" />
			<geometry>
				<sphere radius = "0.090000" />
			</geometry>
		</collision>
		<visual>
			<origin rpy = "0 0 0" xyz = "0.000000 0.070000 0.000000" />
			<geometry>
				<sphere radius = "0.090000" />
			</geometry>
		</visual>
	</link>
	<joint name="root" type="fixed">
		<parent link="base" />
		<child link="root" />
		<origin rpy = "0 0 0" xyz = "0.000000 0.000000 0.0000" />
	</joint>

	<!-- Chest  -->
	<link name="chest">
		<inertial>
			<origin rpy = "0 0 0" xyz = "0.000000 0.120000 0.000000" />
			<mass value = "28.000000" />
			<inertia ixx = "0.1552" ixy = "0" ixz = "0" iyy = "0.1552" iyz = "0" izz = "0.1552" />
		</inertial>
		<collision>
			<origin rpy = "0 0 0" xyz = "0.000000 0.120000 0.000000" />
			<geometry>
				<sphere radius = "0.110000" />
			</geometry>
		</collision>
		<visual>
			<origin rpy = "0 0 0" xyz = "0.000000 0.120000 0.000000" />
			<geometry>
				<sphere radius = "0.110000" />
			</geometry>
		</visual>
	</link>
	<joint name="chest" type="spherical">
		<parent link="root" />
		<child link="chest" />
		<origin rpy = "0 0 0" xyz = "0.000000 0.234 0.000000" />		
	</joint>


	<!-- Neck -->
	<link name="neck">
		<inertial>
			<origin rpy = "0 0 0" xyz = "0.000000 0.17500000 0.000000" />
			<mass value = "4.000000" />
			<inertia ixx = "0.0174" ixy = "0" ixz = "0" iyy = "0.0174" iyz = "0" izz = "0.0174" />
		</inertial>
		<collision>
			<origin rpy = "0 0 0" xyz = "0.000000 0.1750000 0.000000" />
			<geometry>
				<sphere radius = "0.1050000" />
			</geometry>
		</collision>
		<visual>
			<origin rpy = "0 0 0" xyz = "0.000000 0.17500000 0.000000" />
			<geometry>
				<sphere radius = "0.1050000" />
			</geometry>
		</visual>
	</link>
	<joint name="neck" type="spherical">
		<parent link="chest" />
		<child link="neck" />
		<origin rpy = "0 0 0" xyz = "0.000000 0.224 0.000000" />
	</joint>



	<!-- Right Hip -->
	<joint name="right_hip" type="spherical">
		<parent link="root" />
		<child link="right_hip" />
		<origin rpy="0 0 0" xyz="0 0 0.085" />
	</joint>
	<link name="right_hip">
		<inertial>
			<origin rpy = "0 0 0" xyz = "0.000000 -0.240000 0" />
			<mass value = "9.00000" />
			<inertia ixx = "0.126" ixy = "0" ixz = "0" iyy = "0.0138" iyz = "0" izz = "0.126" />
		</inertial>
		<collision>
			<origin rpy = "-1.570796 0 0" xyz = "0.000000 -0.240000 0.000000" />
			<geometry>
				<capsule length="0.1200000" radius="0.055000"/>
			</geometry>
		</collision>
		<visual>
			<origin rpy = "-1.570796 0 0" xyz = "0.000000 -0.240000 0.000000" />
			<geometry>
				<capsule length="0.1200000" radius="0.0550000"/>
			</geometry>			
		</visual>
	</link>
</robot>

Change mass in simulation runtime

Hi there. I have a use case where I would like to change the mass of an object in runtime. However, looking at the source code, the mass property is protected, and I can't find any function to write to it. Am I missing a method for this? Or does the API not support changing the mass in runtime? If not, can I safely just extend the class SingleBodyObject with a method to change mass_ without any consequences?

help on urdf file#2

Hello, thanks for the work.

I want to simulate a schunk gripper using raisim, but encounter a strange behavior.
This gripper has a git repo with a ROS driver (there are available xarco urdf and meshes, Xarco urdf can be easily modified to pure urdf.).

After loading the urdf if manualStepping is turned on, the 'setState' is ok, kinematic part seems ok. But when call 'world.integrate()' there happens Segmentation fault, but not always just in ~half cases. There are not accurate inertia parameters of links, but if the problem is in inertia, usually position of links would be expected as NaNs, not Segmentation fault errors

I've tried to play with urdf params and it seems that after limiting of dof (from 20 to 3-4) errors disappears. Changes related to setTimeStep doesn't make any progress.

Were used just the current version of raisimLib master branch.

urdf file:
https://gist.github.com/alexpostnikov/3b14285a35ed0cc5f25aa079a6a81277

meshes can be found at schunk driver repo, or you can it (and urdf) from gdrive

shunk_svm

Torque/velocity constraints on joints using PD control

Hi,

Is there any way to respect the joint torque/velocity limits defined in a URDF file, e.g.

<limit
      lower="-2.1"
      upper="0.3"
      effort="1.5"
      velocity="6.2" />

while using PD_PLUS_FEEDFORWARD_TORQUE control mode? I know that the P and D gains directly affect the output torque and therefore joint velocity, but shouldn't they still be constrained by the torque and velocity limits of each joint?

add heightmap using textfile and png

Hi,

Have been trying for a few weeks to read in heightmaps from png and and textfile but have not been able to get it to work. Went through the source code and saw that both formats were accepted and seems the easiest to load in more complex terrain that is self defined.

  1. PNG
    tried to read in a png file that looks like the one below. Successfully compiled and loaded it. However, in simulation, it is way too big, the the resolution seems to depend on the scale as well.
    image

image

  1. textfile
    Sucessfully compiled and loaded textfile but get "insufficient number of height values" error
    image

For both these formats, is there a certain format or form of png/txtfile that needs to be parsed in. Would appreciate examples of textfiles and png files that it accepts or more documentation and help on these issues if possible.

Thank you!

Asking for the constraints

I saw that there is the stiffwire constraints
Is there any plan to add distance only constraints? like rod with ball joint on each end.

Generalized Coordinate Questions (and conversion from world frame to body frame)

Hi there,

A question regarding the convention you're using for the generalized coordinates:

Is the quaternion in the convention: x, y, z, w
or: w, x, y, z?

Similarly, what is the convention you're using for the generalized velocity vector regarding the angular velocity? Is this in XYZ Euler,

Finally, I'm trying to get both the generalizedCoordinates and generalizedVelocities from the world frame to the body frame. There doesn't seem to be a function for this, is that correct? If so, would you have any suggestions on converting these to their respective body coordinate frames?

wrong getGeneralizedForce()

I tried to print forces of anymal:
std::cout << anymal_->getGeneralizedForce()<< std::endl;

below is what i obtained from the terminal:
0 0 0 0 0 0 0 -19.0064 16.9814 5.15152 35.6953 -3.19008 18.4637 6.1331 3.68948 -22.224 -32.2061 0.290263
0 0 0 0 0 0 0 -7.06745 -0.517137 22.6091 -8.31036 10.9473 5.02551 -11.7917 -8.03127 -15.1463 24.6648 -13.6599
0 0 0 0 0 0 0 -0.59681 19.526 12.1407 1.15952 0.182062 14.3934 -34.4135 -10.8773 16.3055 -21.6263 -24.984
0 0 0 0 0 0 0 17.7714 1.16777 -14.7985 2.69269 3.34732 -9.81864 -3.19977 4.29663 -4.16517 -22.4896 -12.2793
0 0 0 0 0 0 0 14.8251 3.44768 14.497 1.16175 2.67442 28.0617 5.82688 6.39095 -14.8618 12.9979 12.1853
0 0 0 0 0 0 0 -36.7177 -2.99206 10.8263 -2.13563 15.5825 8.95963 18.5383 -14.7241 25.108 -14.4022 -14.4026
0 0 0 0 0 0 0 3.41373 5.44599 -22.2235 17.8641 -12.9422 3.76054 5.64001 6.73451 -8.9726 25.9793 -21.7382
0 0 0 0 0 0 0 -1.22766 -6.14286 -14.1164 -7.7704 12.8151 -24.2552 -11.0073 -8.60783 1.67216 10.5513 -8.63154
0 0 0 0 0 0 0 -13.5507 -1.41343 20.1651 12.0834 5.55141 -15.6579 1.21728 12.7228 -25.7639 12.8844 -16.4923
0 0 0 0 0 0 0 -51.6053 16.3171 13.2201 -13.1371 -3.9688 12.5896 -0.45729 6.88962 11.1185 -12.0802 5.0165
0 0 0 0 0 0 0 -33.0467 55.8757 -3.79658 12.9501 -2.82743 19.9766 -2.42161 -18.7575 9.14279 37.1704 -1.18315
0 0 0 0 0 0 0 -31.9512 53.2185 17.4517 -5.94892 -3.97466 2.78641 -47.3691 -8.12961 9.72698 24.1693 -21.2707
0 0 0 0 0 0 0 -57.0449 27.9103 24.4798 -30.7587 -5.63999 -15.3937 -37.8111 -30.2737 -32.9886 24.7853 5.4005
0 0 0 0 0 0 0 -19.4207 6.2203 -13.9687 0.240711 2.30872 -4.20359 2.66173 -10.2754 19.9118 -1.92223 0.735265
0 0 0 0 0 0 0 2.09981 -6.85247 22.7617 -5.69461 10.0011 1.24108 -10.9685 5.78047 6.15456 -4.63611 -15.5814
0 0 0 0 0 0 0 17.4764 7.43938 7.22429 11.2891 -14.4075 -2.88991 20.5445 3.63869 -34.4899 -9.58554 -16.8402
0 0 0 0 0 0 0 -19.5238 -13.2854 9.57525 7.21913 3.24537 0.732437 -3.73253 -14.5557 -20.8852 -6.36125 -10.4515
0 0 0 0 0 0 0 -1.79329 -1.78065 -7.42062 2.08612 26.5753 3.16248 -20.1832 12.2045 3.36962 10.2394 7.82083

there should be 12 torques but we have the output of 18 dimension,and only 11 elements have real value. How to explain this? thank you!

unable to use getCollisionObj()

hi, I tried getCollisionObj() but compiled error:

error: ‘raisim::CollisionSet& raisim::ArticulatedSystem::getCollisionObj()’ is protected within this context

how to deal with this problem?
Thx

Robot from SolidWorks-sourced URDF falling through floor

I am writing a Gym environment for a robot in Python using raisimpy, following the ANYmal example environment from raisimpy's examples. The ANYmal URDF loads in fine but using a URDF exported from SolidWorks, I cannot see the robot on the floor. With the floor not loaded visually in raisimOgre, I can see the robot falling down to infinity. I suspect there is a problem with the collision properties in the URDF, which are linked to OBJ files exported from SolidWorks rather than simple shapes defined directly in the URDF. The URDF is as follows:

<?xml version="1.0" encoding="utf-8"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner ([email protected]) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
  name="Quadrupedal Robot URDF ready.SLDASM">
  <link
    name="Body">
    <inertial>
      <origin
        xyz="6.3895E-11 0.00012763 -0.017744"
        rpy="0 0 0" />
      <mass
        value="0.52729" />
      <inertia
        ixx="0.0019565"
        ixy="-6.0032E-10"
        ixz="1.2826E-08"
        iyy="0.00076333"
        iyz="-4.6881E-06"
        izz="0.0025305" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/Body.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.75294 0.75294 0.75294 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/Body.stl.obj" />
      </geometry>
    </collision>
  </link>
  <link
    name="L11">
    <inertial>
      <origin
        xyz="0.0243995568220635 -0.0139117596798611 -0.0357904787858385"
        rpy="0 0 0" />
      <mass
        value="0.0542977426736306" />
      <inertia
        ixx="1.67959891588832E-05"
        ixy="3.99700363772074E-07"
        ixz="4.4933479303535E-07"
        iyy="2.2247186909432E-05"
        iyz="-1.73903214218687E-06"
        izz="1.69288569652552E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L11.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L11.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="S1"
    type="revolute">
    <origin
      xyz="-0.0594999999999999 0.0539983931640023 -0.019"
      rpy="3.14159265358979 0 1.5707963267949" />
    <parent
      link="Body" />
    <child
      link="L11" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-2.1"
      upper="0.3"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L12">
    <inertial>
      <origin
        xyz="-0.0152238321171441 -2.25300842468523E-06 0.0464772913413802"
        rpy="0 0 0" />
      <mass
        value="0.0535927277366091" />
      <inertia
        ixx="2.51586892302995E-05"
        ixy="5.67635781226383E-10"
        ixz="-1.10421470951951E-06"
        iyy="2.95873597072862E-05"
        iyz="-4.43147241892655E-10"
        izz="1.0482568280809E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L12.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L12.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="E1"
    type="revolute">
    <origin
      xyz="0.0115016068359978 0 -0.04199999999999"
      rpy="-2.35619449019235 0 1.5707963267949" />
    <parent
      link="L11" />
    <child
      link="L12" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-1.1"
      upper="1.45"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L13">
    <inertial>
      <origin
        xyz="0.0155767383703316 0.00786484112620819 0.0325185046224157"
        rpy="0 0 0" />
      <mass
        value="0.021869144598202" />
      <inertia
        ixx="1.57449240659093E-05"
        ixy="1.85218206933391E-07"
        ixz="7.65678666734147E-07"
        iyy="1.89273636704953E-05"
        iyz="9.58350118217958E-07"
        izz="6.56779962831476E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L13.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L13.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="K1"
    type="revolute">
    <origin
      xyz="0 0 0.0675"
      rpy="1.5707963267949 0 3.14159265358979" />
    <parent
      link="L12" />
    <child
      link="L13" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-3.2"
      upper="0.5"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L14">
    <inertial>
      <origin
        xyz="-0.003891 0.089782 -1.6556E-08"
        rpy="0 0 0" />
      <mass
        value="0.0048702" />
      <inertia
        ixx="4.7823E-07"
        ixy="-1.5635E-07"
        ixz="-4.7733E-13"
        iyy="3.2701E-07"
        iyz="-3.6521E-13"
        izz="6.9731E-07" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L14.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L14.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Foot1"
    type="fixed">
    <origin
      xyz="0.0145 0.0145 0.02554"
      rpy="1.5708 0 1.5708" />
    <parent
      link="L13" />
    <child
      link="L14" />
    <axis
      xyz="0 0 1" />
  </joint>
  <link
    name="L21">
    <inertial>
      <origin
        xyz="-0.0260020500139342 -0.0139117596798611 -0.0357904787858385"
        rpy="0 0 0" />
      <mass
        value="0.0542977426736306" />
      <inertia
        ixx="1.67959891588832E-05"
        ixy="3.99700363772073E-07"
        ixz="4.49334793035359E-07"
        iyy="2.2247186909432E-05"
        iyz="-1.73903214218687E-06"
        izz="1.69288569652552E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L21.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L21.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="S2"
    type="revolute">
    <origin
      xyz="-0.0595000000000008 -0.0556 -0.0190000000000003"
      rpy="3.14159265358979 0 1.5707963267949" />
    <parent
      link="Body" />
    <child
      link="L21" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-2.1"
      upper="0.3"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L22">
    <inertial>
      <origin
        xyz="-0.0152238321171441 -2.25300842466442E-06 0.0464772913413802"
        rpy="0 0 0" />
      <mass
        value="0.0535927277366092" />
      <inertia
        ixx="2.51586892302995E-05"
        ixy="5.67635781227972E-10"
        ixz="-1.1042147095195E-06"
        iyy="2.95873597072862E-05"
        iyz="-4.43147241911289E-10"
        izz="1.0482568280809E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L22.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L22.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="E2"
    type="revolute">
    <origin
      xyz="-0.0388999999999999 0 -0.04199999999999"
      rpy="-2.35619449019235 0 1.5707963267949" />
    <parent
      link="L21" />
    <child
      link="L22" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-1.1"
      upper="1.45"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L23">
    <inertial>
      <origin
        xyz="0.0155767383703317 0.007864841126208 0.0325185046224158"
        rpy="0 0 0" />
      <mass
        value="0.0218691445982019" />
      <inertia
        ixx="1.57449240659093E-05"
        ixy="1.85218206933387E-07"
        ixz="7.65678666734157E-07"
        iyy="1.89273636704953E-05"
        iyz="9.58350118217964E-07"
        izz="6.56779962831476E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L23.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L23.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="K2"
    type="revolute">
    <origin
      xyz="0 0 0.0674999999999999"
      rpy="1.5707963267949 0 3.14159265358979" />
    <parent
      link="L22" />
    <child
      link="L23" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-3.2"
      upper="0.5"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L24">
    <inertial>
      <origin
        xyz="0.0072466 0.019677 0.0082129"
        rpy="0 0 0" />
      <mass
        value="0.0048702" />
      <inertia
        ixx="4.7823E-07"
        ixy="-1.5635E-07"
        ixz="-4.7733E-13"
        iyy="3.2701E-07"
        iyz="-3.6521E-13"
        izz="6.9731E-07" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L24.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L24.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Foot2"
    type="fixed">
    <origin
      xyz="0.0062871 0.0033624 0.095646"
      rpy="1.5708 0 1.5708" />
    <parent
      link="L23" />
    <child
      link="L24" />
    <axis
      xyz="0 0 1" />
  </joint>
  <link
    name="L31">
    <inertial>
      <origin
        xyz="-0.0243997055070884 -0.0139117596798611 -0.035793457414895"
        rpy="0 0 0" />
      <mass
        value="0.0542977426736307" />
      <inertia
        ixx="1.67979856593742E-05"
        ixy="-3.99583945134582E-07"
        ixz="-4.50175601473545E-07"
        iyy="2.22492092782239E-05"
        iyz="-1.73815331900421E-06"
        izz="1.69288828335561E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L31.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L31.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="S3"
    type="revolute">
    <origin
      xyz="0.0594999999999999 0.0539983931640023 -0.019"
      rpy="3.14159265358979 0 -1.5707963267949" />
    <parent
      link="Body" />
    <child
      link="L31" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-2.1"
      upper="0.3"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L32">
    <inertial>
      <origin
        xyz="-0.0152238321171441 -1.5693747225376E-07 0.0464772913413801"
        rpy="0 0 0" />
      <mass
        value="0.0535927277366091" />
      <inertia
        ixx="2.51586895010187E-05"
        ixy="4.86324708459078E-10"
        ixz="-1.10421470951949E-06"
        iyy="2.95873597072862E-05"
        iyz="1.33164835788701E-09"
        izz="1.04825685515283E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L32.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L32.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="E3"
    type="revolute">
    <origin
      xyz="-0.0115016068359978 0 -0.042"
      rpy="2.35619449019235 0 1.5707963267949" />
    <parent
      link="L31" />
    <child
      link="L32" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-1.1"
      upper="1.45"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L33">
    <inertial>
      <origin
        xyz="-0.0155766133039519 0.00786484112620797 0.0325184983163559"
        rpy="0 0 0" />
      <mass
        value="0.0218691445982019" />
      <inertia
        ixx="1.57449330350408E-05"
        ixy="-1.85429515702216E-07"
        ixz="-7.65681275624552E-07"
        iyy="1.89273785292477E-05"
        iyz="9.58348342255634E-07"
        izz="6.56780551793559E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L33.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L33.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="K3"
    type="revolute">
    <origin
      xyz="0 0 0.0674999999999999"
      rpy="1.5707963267949 0 0" />
    <parent
      link="L32" />
    <child
      link="L33" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-3.2"
      upper="0.5"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L34">
    <inertial>
      <origin
        xyz="0.0072466 0.019677 -0.0082129"
        rpy="0 0 0" />
      <mass
        value="0.0048702" />
      <inertia
        ixx="4.7823E-07"
        ixy="-1.5635E-07"
        ixz="-4.7733E-13"
        iyy="3.2701E-07"
        iyz="-3.6519E-13"
        izz="6.9731E-07" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L34.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L34.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Foot3"
    type="fixed">
    <origin
      xyz="-0.0062871 0.0033624 0.095646"
      rpy="1.5708 0 1.5708" />
    <parent
      link="L33" />
    <child
      link="L34" />
    <axis
      xyz="0 0 1" />
  </joint>
  <link
    name="L41">
    <inertial>
      <origin
        xyz="0.026005455846703 -0.0139117596798611 -0.035793457414895"
        rpy="0 0 0" />
      <mass
        value="0.0542977426736307" />
      <inertia
        ixx="1.67979856593742E-05"
        ixy="-3.99583945134579E-07"
        ixz="-4.50175601473558E-07"
        iyy="2.22492092782239E-05"
        iyz="-1.7381533190042E-06"
        izz="1.69288828335561E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L41.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L41.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="S4"
    type="revolute">
    <origin
      xyz="0.0594999999999999 -0.0555964454822063 -0.019"
      rpy="3.14159265358979 0 -1.5707963267949" />
    <parent
      link="Body" />
    <child
      link="L41" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-2.1"
      upper="0.3"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L42">
    <inertial>
      <origin
        xyz="-0.0152238321171441 -1.56937472260699E-07 0.0464772913413801"
        rpy="0 0 0" />
      <mass
        value="0.0535927277366091" />
      <inertia
        ixx="2.51586895010187E-05"
        ixy="4.86324708458654E-10"
        ixz="-1.10421470951951E-06"
        iyy="2.95873597072862E-05"
        iyz="1.33164835788531E-09"
        izz="1.04825685515283E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L42.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L42.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="E4"
    type="revolute">
    <origin
      xyz="0.0389035545177936 0 -0.042"
      rpy="2.35619449019235 0 1.5707963267949" />
    <parent
      link="L41" />
    <child
      link="L42" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-1.1"
      upper="1.45"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L43">
    <inertial>
      <origin
        xyz="-0.0155766133039519 0.00786484112620803 0.0325184983163559"
        rpy="0 0 0" />
      <mass
        value="0.0218691445982019" />
      <inertia
        ixx="1.57449330350409E-05"
        ixy="-1.85429515702235E-07"
        ixz="-7.65681275624543E-07"
        iyy="1.89273785292478E-05"
        iyz="9.58348342255608E-07"
        izz="6.56780551793557E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L43.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L43.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="K4"
    type="revolute">
    <origin
      xyz="0 0 0.0674999999999999"
      rpy="1.5707963267949 0 0" />
    <parent
      link="L42" />
    <child
      link="L43" />
    <axis
      xyz="1 0 0" />
    <limit
      lower="-3.2"
      upper="0.5"
      effort="1.5"
      velocity="6.2" />
  </joint>
  <link
    name="L44">
    <inertial>
      <origin
        xyz="0.0072466 0.019677 -0.0082129"
        rpy="0 0 0" />
      <mass
        value="0.0048702" />
      <inertia
        ixx="4.7823E-07"
        ixy="-1.5635E-07"
        ixz="-4.775E-13"
        iyy="3.2701E-07"
        iyz="-3.6522E-13"
        izz="6.9731E-07" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L44.stl.obj" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="../meshes/L44.stl.obj" />
      </geometry>
    </collision>
  </link>
  <joint
    name="Foot4"
    type="fixed">
    <origin
      xyz="-0.0062871 0.0033624 0.095646"
      rpy="1.5708 0 1.5708" />
    <parent
      link="L43" />
    <child
      link="L44" />
    <axis
      xyz="0 0 1" />
  </joint>
</robot>

I can provide the collision OBJs if necessary. Appreciate any help.

Heightmaps setPose (and friends) give wrong behaviour

Hi, thanks for the great physics engine. I found this issue while working with heightmaps created using data from a std::vector. Below I've attached some extra information.

  • Issue: Heightmaps collision detection "stops" working when we set the position of the heightmap using either setPosition or setPose.
  • OS: Ubuntu 18.04.3 LTS
  • RaisimLib-version: master branch (HEAD @ dfc3d63)
  • To reproduce: see example heightmapFromCpp in this branch.
  • Behaviour: See gifs below. When it fails, there seems to be a collider below the actual graphical object (look at the capsule in the middle as it bounces on something invisible).

Using hm->setPosition (collision fails)

gif_issue_heightmaps_pose_1

Using centerX, centerY

gif_issue_heightmaps_pose_2

This happens with both the constructor from std::vector data, and the one using TerrainProperties.

Note: A workaround I'm using is to set both centerX and centerY with the x-y position required, and offset all my heights by the z-position I wanted the heightmap to be. So far it works ok, but if using TerrainProperties, there's no offset parameter exposed (as in the fromPng constructor), so in that case I can't place the heightmap exactly where I need it.

is External force continued

Hi ,I have setExternal force ,but I found it instantaneous, how can I set a continue force or torque . Thanks

how to capture images from env

Hi, I'm wondering how can I get img from env for CNN model training.
I'm working on a maze-solving problem with raisimGym. It looks like
小球成功走迷宫

I want the CNN model to capture the view that GUI showed, so that the agent can learn to push the ball like playing a video-game.
I found a function named copyContentsToMemory() in Orge3d, but I have no idea how to use it in raisimLib.
https://ogrecave.github.io/ogre/api/latest/class_ogre_1_1_render_target.html#a62f7ce3ddeb263e5561c8521401f4ad6

Any information or help will be appreciated.

setExternalTorque() not implemented yet ?

Hello,

First of all, thanks for this awesome simulator!

I've been attempting to set an external torque to a body by using the setExternalTorque() function. Unfortunately, it returns "not implemented yet". Is there a simple workaround? Or, should I simply wait for the proper implementation, and if so, when do you expect it to be implemented.

Thanks!

mesh collision broken

I spotted that the mesh collision is not working anymore in master. It will be fixed very soon. make sure that you pull after the push

RaiSim for Gazebo

Hello,

I am using Gazebo simulator for some robot software development and right now I'm stucked on a problem where ODE just seems to be too imprecise to even be used for my case. When I simulate a wheeled robot it slips on the ground no matter how I set the friction, I cannot get it to be realistic. I saw your comparison of common physics engines where the RaiSim rated quite high. I do have certain doubts about the setting of the other physics engines in the tests but knowing that the ODE really does not perform very well for my usecase, I'm wondering if maybe your engine would solve my problems.

I am only a user when it comes to simulation software so I do not understand how it works (and I do not understand the physics you describe in your paper). But say I want to plug the RaiSim physics into Gazebo instead of ODE. Can you describe how would I go about it or point me to any materials that do describe this? When I look into the repos I see no hint on how to do it.

Can I use sdf format?

Urdf format can only describe the "open loop" robot. But many robot or other machines have "closed loop", and can I use raisim with sdf format?

How to retrieve contact forces

How can one retrieve contact forces from the simulation?

I have an articulated system and am retrieving contact information using the robot->getContacts() member. I tried to compute forces using finite-differences on contact impulses retrieved from robot->getContacts()[k].getImpulse() member but the values do not seem to correspond to physical values. I'm simply initializing the robot (a quadruped) in a standing configuration and with the joints frozen via a simple PD joint-space controller.

What would be the most appropriate way of retrieving contact forces from the data afforded by the world of robot instances?

Some sphere have infinite rotation

raisim01

In simple example (30 spheres and 30 cubes), find that some sphere have infinite rotation.

raisim::Vec<3> angulatDamp= {0.75, 0.75, 0.75};
ob->setLinearDamping(0.75);
ob->setAngularDamping(angulatDamp);

Need to change some parameters to stop this rotations?

Change gravity vector?

Hi Jemin,

Thank you very much for releasing this, such a useful tool.

I can't figure out how to change the gravitational acceleration... Have tried directly defining the vector in World.hpp in the include directory of LOCAL_BUILD, as well as changing stuff in ode, but nothing seems to be changing the behaviour of the robot when I build and launch my environment in raisimGym...

Am I missing something?

Thanks.

Unknown body id with getBodyIdx

Hi,

When using getBodyIdx on a body attached to a fixed joint I get the error ArticulatedSystem.cpp:1364] unknown body id.

When changing the joint type to revolute, there are no issues. I have tested on my own URDF and that of the ANYmal example in raisimGym and they both produce the same problem.

Thanks

Support of origin tag inside inertial

Hi!
I've realised that when adding an origin tag inside an inertial I quickly get a segmentation fault. Is the origin tag for inertial supported?

Edit: I confirmed that the addition of the origin tag inside an inertial element is the change that causes the simulator to crash. The tag in question is <origin rpy="1.57 0 1.57" xyz="0 0 0"/>.

Thanks,
Wolfgang

Feature request: addExternalTorque() with the possibility to define the location of the torque

Hi again!

Recently, I had to specify an external torque applied to a specific location on a body. The actual implementation of the addExternalTorque() function does not allow to specify the location (and frame in which it is expressed in). Therefore, I had to use addExternalForce() to obtain the required effect, but this approach seems sub-optimal from a user standpoint. Would it be possible to overload addExternalTorque() to specify the location of the applied torque (in a way similar to addExternalForce())?

Thank you.

On a side note, perhaps the "in-code" documentation could specify where the torque is applied: at the center of mass of the body? or the origin of the body frame? This would clarify a bit. Thanks.

Question about 'updateKinematics'

Hi, little confused about the function ArticulatedSystem::updateKinematics().

What operation it will do if call this manually ? For the situation only want the kinematics without run simulation, after call setState, 'getFramePosition' return the updated pose but 'getFrameVelocity' not change, and call 'updateKinematics' makes no difference, instead 'preContactSolverUpdate1' can update the world vel of body and frame.

Where Can I Display The Contact Forces !

In the process of simulation , I need the contact force data
between the foot and the ground as the feedback input . but I can't found the function (or the class).
where can I found Contacts Force and how can I Call It
Screenshot from 2019-09-29 16-46-14

The ```setExternalForce()``` method

Hi

I'm getting unpredictable behaviour in my simulation, and it seems the only statement in my code that has ambiguous meaning is the setExternalForce() that I applied to one of my objects. What is the localidx parameter that has to be applied to it?

Nothing seems to change no matter the integer I pass to it, but if it's in the method, I assume it serves some purpose.

What are the addCompound's parameter?

Hi, when I try to use the API "addCompound" in World.hpp to create "Compound" object, I have no idea about its parameter. The reason I want to create this object is that I want to create a "slope" or "wall" or "gap" terrain in order to train in raisimGym.

Compound *addCompound(const std::vector<Compound::CompoundObjectChild> &children,
                        double mass,
                        const Mat<3, 3>& inertia,
                        CollisionGroup collisionGroup = 1,
                        CollisionGroup collisionMask = CollisionGroup(-1));

Well, I mean what kind of type Compound::CompoundObjectChild is? I have seen in your Compound.hpp. It used the reference to a list while there is no notation about this "list"

struct CompoundObjectChild {
    ObjectType objectType;
    Vec<4> objectParam;
    std::string material;
    Transformation trans;
  };
  Compound(const std::vector<CompoundObjectChild>& list, double mass, Mat<3,3> inertia);

So, what "list" should I give? Maybe a urdf path? I have no idea and hope for your reply ASAP.
Thanks in advance.
@jhwangbo @tomlankhorst @vastsoun

The SingleBodyObject::setMass() method

Hi Again

I posted an issue 3 months back about there not being a setMass() method for rigid objects, which you solved ( #45 ).

However, I'm calling setMass() during my simulation runtime, feeding an object with a time-varying mass, and I have the problem that the output of getMass() is always the value of the first setMass() call, so the mass doesn't actually vary with time. My simulation output is also consistent with a time-static mass.

Is this expected behaviour? Or am I just potentially doing something wrong?

can not add a cone

I just want to add cone . First , I define auto cone =world.addCone(0.1,0.1,10), cone->setPosition(1,2,0); Then , vis->createGraphicalObject(cone,"cone","default");
but it error " no matching function for call to ‘raisim::OgreVis::createGraphicalObject(raisim::Cone*&, const char [5], const char [8])"

and I can't found this function ,how can i add a cone or object like triangle

Asking the plan for supporting MacOS

I tried to install raisimLib and raisimOgre in Mac but it didn't work properly.
I could build almost everything but it failed right before finishing the raisimOgre make.
I think that the major reason of the failure is .so files of raisimLib generated for Ubuntu system.
I want to know is there any plan to support MacOS.

Thanks,

Joint limits are not respected

Hello,

Joint limits (defined in the .urdf file) are not respected when forces (or torques) acting on a given body are too high. In my case, the joints are free to move (no damping, no controller).
Also, forces that cause problems are applied by an external torque. I made sure to saturate the torque value to make sure they remain physically possible. In fact, I had to saturate them to even lower values. The problem is also often triggered when the body comes into contact with the ground. Reducing the time step to 0.0001 seconds helps, but it does not completely solve the problem. When, the limits are exceeded, the body is free to rotate, while torque continues to apply. It all goes crazy and the simulation crashes.

Is there something on my side I could do to mitigate the problem?

Thank you!

How to add Mesh to World not from file but from raisim::Mesh

In Class World only one method to add mesh to world:
Mesh *addMesh(const std::string &fileName,
double mass,
const Mat<3, 3> &inertia,
const Vec<3> &COM,
double scale = 1,
const std::string &material = "",
CollisionGroup collisionGroup = 1,
CollisionGroup collisionMask = CollisionGroup(-1));
Is it possible to add Mesh to World direct from class Mesh

And more question: can you plan to open source of engine?

getPosition function sometimes returns NaN values

I am using this library in combination with raisimGym and I developed my own Environment, but when I run more than 50 environments simultaneously (num_envs = 50), and query the object position using object->getPosition(pos);, I sometimes get NaN values in the pos variable.

Could you tell me why this is happening?

bug on math::angleAxisToQuaternion

Hello, found a bug on math.cpp angleAxisToQuaternion:

inline void angleAxisToQuaternion(const Vec<3> &a1, const double theta, Vec<4>& quaternion) {
  quaternion[0] = cos(theta * .5);
  quaternion[0] = a1[0] * sin(theta * .5);
  quaternion[1] = a1[1] * sin(theta * .5);
  quaternion[2] = a1[2] * sin(theta * .5);
}

index is not right, suppose to be:

inline void angleAxisToQuaternion(const Vec<3> &a1, const double theta, Vec<4>& quaternion) {
  quaternion[0] = cos(theta * .5);
  quaternion[1] = a1[0] * sin(theta * .5);
  quaternion[2] = a1[1] * sin(theta * .5);
  quaternion[3] = a1[2] * sin(theta * .5);
}

Add APIs to create sequentially an ArticulatedSystem

The current version of RaiSim allows creating a model only by loading an existing URDF model.

In order to integrate the physics engine in other applications, it would be beneficial having APIs to programmatically add links, joints, visual (shapes and meshes) and collisions.

I assume that under the hood, the URDF parser at one point calls methods that add these entities into the simulation. What I mean, in other words, is that it would be nice having these methods publicly exposed.

Having this feature would allow users to use alternative descriptions than URDF, demanding their deserialization to user code.

about the getContactPointVel method in ArticulatedSystem

Hi,

I am trying to use the getContactPointVel method, with the pointID and raisim::Vec<3> vel as arguments. but I get segfault. Do you have any suggestion to fix the problem?

for example, then code is:
raisim::Vec<3> footVel_hl;
footVel_hl.setZero();
for(auto& contact: robot -> getContacts()) {
if ( footIndex_hl == contact.getlocalBodyIndex() ) {
robot->getContactPointVel(footIndex_hl, footVel_hl);
}
}

A few questions

Hello. Great work on the physics simulator. Happy to see an alternative to PyBullet pop up. I have a few questions:

  1. Do you have, or plan to have Python bindings for your physics simulator?

  2. Is the simulator in a state where one could easily implement a gripper arm? Any reason why this would not work?

  3. Can you easily support multiple simulator instances in one process?

  4. Does your simulator support polygonal meshes? Could I pass a list of triangles/faces to it programmatically? (without loading from a model file)

Crashing of Object function got by raisim::World::getObject only when rendering.

When I have a world and added a height map as below,

std::unique_ptr<raisim::World> world;
heightMap = world->addHeightMap(0.0, 0.0, terrainProperties);
heightMap->setName("heightMap");

The getObject function with name and casting to the HeightMap class works fine without rendering.

const auto& heightMap = dynamic_cast<HeightMap*>(world->getObject("heightMap"));
double height = heightMap->getHeight(0.0, 0.0);

But, when I enable the rendering, it crashes with the same program.

Valgrind gives

Address 0x4a8 is not stack'd, malloc'd or (recently) free'd
0x53C8FE0: raisim::HeightMap::getHeight(double, double) const (in /opt/raisim/lib/libraisim.so)

Collision body could be stuck in the ground

Screenshot from 2019-08-26 15-00-56
I tried to calculate foot positions but found that collision bodies could be stuck in the ground. As shown in the above picture, the height of foot is negative.

is it a bug?

Support for mimic joints

Thanks for the nice simulator.

Are there any plans for supporting mimic joints (that URDF supports)? We really need this feature. Thanks a lot! If needed I can provide test URDF files..

Calling getLinearVelocity() on a kinematic object

Hi There
I have a simulation where I am imposing a position on a kinematic object, and trying to read its velocity with getLinearVelocity(), but the output I get is 0. Is this something I'm doing wrong on my side, or is this expected behaviour?

The same method seems to work fine for an object I have set to dynamic.

Segmentation fault for articulated system with 0 movable joints

While this may sound like a contradiction, it's perhaps useful to debug a URDF that only contains fixed or no joints at all (root link only).

To reproduce: call addArticulatedSystem on a URDF with a base link and no further joints or links.

Observed behaviour: Segmentation fault.

Expected behaviour: Adds the system with no movable joint (single rigid body) or throws an exception saying that at least one movable (revolute, continuous, prismatic, spherical) joint is required.

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.