Skip to content

Commit

Permalink
Added Garmin 18x, Novatel smart 6 and 7
Browse files Browse the repository at this point in the history
  • Loading branch information
roni-kreinin committed Jul 27, 2023
1 parent 1d383de commit 94e1fd6
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def generate(self) -> None:
print(f'Generated {self.xacro_writer.file_path}robot.urdf.xacro')

def generate_platform(self) -> None:
self.platform = self.clearpath_config.platform.get_model()
self.platform = self.clearpath_config.platform.get_platform_model()
platform_description = PlatformDescription(self.platform)

# Platform macro
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@
# of Clearpath Robotics.

from clearpath_config.sensors.types.sensor import BaseSensor
from clearpath_config.sensors.types.lidars_2d import HokuyoUST10, SickLMS1XX, BaseLidar2D
from clearpath_config.sensors.types.lidars_3d import VelodyneLidar, BaseLidar3D
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.gps import SwiftNavDuro
from clearpath_config.sensors.types.gps import (
Garmin18x,
NovatelSmart6,
NovatelSmart7,
SwiftNavDuro
)


from typing import List
Expand Down Expand Up @@ -160,7 +165,10 @@ def __init__(self, sensor: IntelRealsense) -> None:
IntelRealsense.SENSOR_MODEL: IntelRealsenseDescription,
Microstrain.SENSOR_MODEL: ImuDescription,
VelodyneLidar.SENSOR_MODEL: Lidar3dDescription,
SwiftNavDuro.SENSOR_MODEL: BaseDescription
SwiftNavDuro.SENSOR_MODEL: BaseDescription,
Garmin18x.SENSOR_MODEL: BaseDescription,
NovatelSmart6.SENSOR_MODEL: BaseDescription,
NovatelSmart7.SENSOR_MODEL: BaseDescription
}

def __new__(cls, sensor: BaseSensor) -> BaseDescription:
Expand Down
31 changes: 31 additions & 0 deletions clearpath_sensors_description/urdf/garmin_18x.urdf.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="garmin_18x" params="name parent_link *origin">
<link name="${name}_link">
<visual>
<material name="black"/>
<geometry>
<cylinder radius="0.0305" length="0.0195" />
</geometry>
</visual>
<collision>
<material name="black"/>
<geometry>
<cylinder radius="0.0305" length="0.0195" />
</geometry>
</collision>
</link>
<joint name="${name}_joint" type="fixed">
<child link="${name}_link"/>
<parent link="${parent_link}"/>
<xacro:insert_block name="origin"/>
</joint>

<gazebo reference="${name}_link">
<sensor name="${name}" type="navsat">
<always_on>1</always_on>
<update_rate>1</update_rate>
</sensor>
</gazebo>
</xacro:macro>
</robot>
14 changes: 13 additions & 1 deletion clearpath_sensors_description/urdf/novatel_smart6.urdf.xacro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="novatel_smart6" params="name">
<xacro:macro name="novatel_smart6" params="name parent_link *origin">
<link name="${name}_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
Expand All @@ -12,5 +12,17 @@
</material>
</visual>
</link>
<joint name="${name}_joint" type="fixed">
<child link="${name}_link"/>
<parent link="${parent_link}"/>
<xacro:insert_block name="origin"/>
</joint>

<gazebo reference="${name}_link">
<sensor name="${name}" type="navsat">
<always_on>1</always_on>
<update_rate>1</update_rate>
</sensor>
</gazebo>
</xacro:macro>
</robot>
13 changes: 10 additions & 3 deletions clearpath_sensors_description/urdf/novatel_smart7.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@
</link>

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

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

0 comments on commit 94e1fd6

Please sign in to comment.