I know that this is a pretty exotic question for the bullet physics forum, but I still give it a try.
I am working on a cartpole model for reinforcement learning with pybullet, so the model is built in urdf. The model looks all well but the joint between the cart and the pole somehow is fixed instead of continuous. Can anybody spot the problem here:
Code: Select all
<?xml version="1.0"?>
<robot name="cartpolev0">
<link name="cart">
<contact>
<lateral_friction value="1.0"/>
<rolling_friction value="0.0"/>
<inertia_scaling value="3.0"/>
<contact_cfm value="0.0"/>
<contact_erp value="1.0"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value="1"/>
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0.0 0.0 0.0"/>
<geometry>
<box size="0.2 0.2 0.05"/>
</geometry>
<material name="blockmat">
<color rgba="0.9 0.2 0.1 1"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0.0 0.0 0.0"/>
<geometry>
<box size="0.2 0.2 0.05"/>
</geometry>
</collision>
</link>
<joint name="cart_pole_joint" type="continuous">
<parent link="cart"/>
<child link="pole"/>
<origin rpy="1.57 0 0" xyz="0 0 0"/>
<axis xyz="0 1 0"/>
</joint>
<link name="pole">
<contact>
<lateral_friction value="1.0"/>
<rolling_friction value="0.0"/>
<inertia_scaling value="3.0"/>
<contact_cfm value="0.0"/>
<contact_erp value="1.0"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value="0.2"/>
<inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0.0 0.25 0.0"/>
<geometry>
<box size="0.02 0.5 0.02"/>
</geometry>
<material name="blockmat">
<color rgba="0.2 0.7 0.1 1"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0.0 0.25 0.0"/>
<geometry>
<box size="0.02 0.5 0.02"/>
</geometry>
</collision>
</link>
</robot>