Skip to content

Commit

Permalink
Merge pull request #25 from clearpathrobotics/rkreinin/umx
Browse files Browse the repository at this point in the history
Added UM6/7
  • Loading branch information
roni-kreinin authored Jul 31, 2023
2 parents 0ed01ca + 301c616 commit d925685
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
from clearpath_config.sensors.types.lidars_2d import BaseLidar2D, HokuyoUST10, SickLMS1XX
from clearpath_config.sensors.types.lidars_3d import BaseLidar3D, VelodyneLidar
from clearpath_config.sensors.types.cameras import BaseCamera, IntelRealsense
from clearpath_config.sensors.types.imu import BaseIMU, Microstrain
from clearpath_config.sensors.types.imu import (
BaseIMU,
CHRoboticsUM6,
Microstrain,
RedshiftUM7
)
from clearpath_config.sensors.types.gps import (
Garmin18x,
NovatelSmart6,
Expand Down Expand Up @@ -168,7 +173,9 @@ def __init__(self, sensor: IntelRealsense) -> None:
SwiftNavDuro.SENSOR_MODEL: BaseDescription,
Garmin18x.SENSOR_MODEL: BaseDescription,
NovatelSmart6.SENSOR_MODEL: BaseDescription,
NovatelSmart7.SENSOR_MODEL: BaseDescription
NovatelSmart7.SENSOR_MODEL: BaseDescription,
CHRoboticsUM6.SENSOR_MODEL: ImuDescription,
RedshiftUM7.SENSOR_MODEL: ImuDescription
}

def __new__(cls, sensor: BaseSensor) -> BaseDescription:
Expand Down
35 changes: 35 additions & 0 deletions clearpath_sensors_description/urdf/chrobotics_um6.urdf.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:macro name="chrobotics_um6" params="name parent_link update_rate:=100 *origin">
<link name="${name}_base_link"/>

<link name="${name}_link">
<visual>
<geometry>
<box size="0.02 0.02 0.005"/>
</geometry>
<material name="dark_grey" />
</visual>
</link>

<joint name="${name}_base_joint" type="fixed">
<xacro:insert_block name="origin" />
<parent link="${parent_link}" />
<child link="${name}_base_link" />
</joint>

<joint name="${name}_joint" type="fixed">
<origin xyz="0 0 0.0025"/>
<parent link="${name}_base_link" />
<child link="${name}_link" />
</joint>

<gazebo reference="${name}_link">
<sensor type="imu" name="${name}">
<always_on>true</always_on>
<update_rate>${update_rate}</update_rate>
<visualize>true</visualize>
</sensor>
</gazebo>
</xacro:macro>
</robot>
35 changes: 35 additions & 0 deletions clearpath_sensors_description/urdf/redshift_um7.urdf.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:macro name="redshift_um7" params="name parent_link update_rate:=100 *origin">
<link name="${name}_base_link"/>

<link name="${name}_link">
<visual>
<geometry>
<box size="0.02 0.02 0.005"/>
</geometry>
<material name="dark_grey" />
</visual>
</link>

<joint name="${name}_base_joint" type="fixed">
<xacro:insert_block name="origin" />
<parent link="${parent_link}" />
<child link="${name}_base_link" />
</joint>

<joint name="${name}_joint" type="fixed">
<origin xyz="0 0 0.0025"/>
<parent link="${name}_base_link" />
<child link="${name}_link" />
</joint>

<gazebo reference="${name}_link">
<sensor type="imu" name="${name}">
<always_on>true</always_on>
<update_rate>${update_rate}</update_rate>
<visualize>true</visualize>
</sensor>
</gazebo>
</xacro:macro>
</robot>

0 comments on commit d925685

Please sign in to comment.