Simple ros2-controll mock setup
This commit is contained in:
70
mg_wheel_interface/assets/mg_base.urdf
Normal file
70
mg_wheel_interface/assets/mg_base.urdf
Normal file
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot name="mg-robot">
|
||||
|
||||
|
||||
<material name="red">
|
||||
<color rgba="1 0 0 1" />
|
||||
</material>
|
||||
|
||||
<material name="gray">
|
||||
<color rgba="0.5 0.5 0.5 1" />
|
||||
</material>
|
||||
|
||||
<link name="base-link">
|
||||
<visual>
|
||||
<geometry>
|
||||
<box size="0.5 0.5 0.2" color="yellow"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0.12" rpy="0 0 0" />
|
||||
<material name="red" />
|
||||
</visual>
|
||||
</link>
|
||||
|
||||
<link name="left-wheel">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder radius="0.1" length="0.05"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0" rpy="1.57 0 0" />
|
||||
<material name="gray" />
|
||||
</visual>
|
||||
</link>
|
||||
|
||||
<link name="right-wheel">
|
||||
<visual>
|
||||
<geometry>
|
||||
<cylinder radius="0.1" length="0.05"/>
|
||||
</geometry>
|
||||
<origin xyz="0 0 0" rpy="1.57 0 0" />
|
||||
<material name="gray" />
|
||||
</visual>
|
||||
</link>
|
||||
|
||||
<joint name="right_motor" type="continuous">
|
||||
<parent link="base-link"/>
|
||||
<child link="right-wheel"/>
|
||||
<origin xyz="0 -0.25 0.1" rpy="0 0 3.141592" />
|
||||
</joint>
|
||||
|
||||
<joint name="left_motor" type="continuous">
|
||||
<parent link="base-link"/>
|
||||
<child link="left-wheel"/>
|
||||
<origin xyz="0 0.25 0.1" rpy="0 0 0" />
|
||||
</joint>
|
||||
|
||||
|
||||
<ros2_control name="mg-base" type="system">
|
||||
<hardware>
|
||||
<plugin>mock_components/GenericSystem</plugin>
|
||||
<param name="calculate_dynamics">true</param>
|
||||
</hardware>
|
||||
<joint name="left_motor">
|
||||
<command_interface name="velocity"/>
|
||||
<state_interface name="position"/>
|
||||
</joint>
|
||||
<joint name="right_motor">
|
||||
<command_interface name="velocity"/>
|
||||
<state_interface name="position"/>
|
||||
</joint>
|
||||
</ros2_control>
|
||||
</robot>
|
||||
Reference in New Issue
Block a user