How to set joint origin when using pb.createMultiBody()
Posted: Sun Feb 02, 2020 9:40 pm
Hey, thanks for this library.
I'm trying to use the pb.createMultiBody() function to create a basic robot system. As an example I'm trying to recreate the cartpole example from the cartpole.urdf file in some of the examples. I can get the prismatic joint working fine, but I can't get the pole to rotate around the block. Instead it rotates around its centre of mass, a bit like a propeller.
I've been looking through the docs for the Quickstart guide and the pb.createMultiBody() function but I can't see how you pass in the joint origin. In the urdf its the variable in bold:
<joint name="cart_to_pole" type="continuous">
<axis xyz="0 1 0"/>
<origin xyz="0.0 0.0 0"/>
<parent link="cart"/>
<child link="pole"/>
</joint>
Any advice?
Regards, Matt
I'm trying to use the pb.createMultiBody() function to create a basic robot system. As an example I'm trying to recreate the cartpole example from the cartpole.urdf file in some of the examples. I can get the prismatic joint working fine, but I can't get the pole to rotate around the block. Instead it rotates around its centre of mass, a bit like a propeller.
I've been looking through the docs for the Quickstart guide and the pb.createMultiBody() function but I can't see how you pass in the joint origin. In the urdf its the variable in bold:
<joint name="cart_to_pole" type="continuous">
<axis xyz="0 1 0"/>
<origin xyz="0.0 0.0 0"/>
<parent link="cart"/>
<child link="pole"/>
</joint>
Any advice?
Regards, Matt