Skip to content

Commit

Permalink
Merge 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-camero committed May 17, 2024
2 parents a183a2d + 2404ebc commit 8e6b1f2
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package clearpath_config
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.2.8 (2024-05-14)
------------------
* Renamed node to intel_realsense in config
* Contributors: Luis Camero

0.2.7 (2024-04-08)
------------------
* Re-added host and namespace
Expand Down
4 changes: 3 additions & 1 deletion clearpath_config/common/types/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Platform:
# Dingo D V1.5
DD150 = "dd150"
# Dingo D V1.5
DO150 = "d0150"
DO150 = "do150"
# Jackal V1
J100 = "j100"
# Husky V2
Expand Down Expand Up @@ -90,6 +90,7 @@ class Platform:
A200: PACSProfile(rows=8, columns=7),
J100: PACSProfile(rows=4, columns=2),
W200: PACSProfile(rows=100, columns=100),
R100: PACSProfile(rows=100, columns=100),
}

INDEX = {
Expand All @@ -100,5 +101,6 @@ class Platform:
DD150: IndexingProfile(imu=1),
DO150: IndexingProfile(imu=1),
J100: IndexingProfile(gps=1, imu=1),
R100: IndexingProfile(imu=1),
W200: IndexingProfile(imu=1),
}
2 changes: 2 additions & 0 deletions clearpath_config/platform/attachments/mux.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from clearpath_config.platform.attachments.do150 import DO150Attachment
from clearpath_config.platform.attachments.generic import GENERICAttachment
from clearpath_config.platform.attachments.j100 import J100Attachment
from clearpath_config.platform.attachments.r100 import R100Attachment
from clearpath_config.platform.attachments.w200 import W200Attachment
from clearpath_config.platform.types.attachment import BaseAttachment

Expand All @@ -48,6 +49,7 @@ class AttachmentsConfigMux:
Platform.GENERIC: AttachmentsConfig(GENERICAttachment),
Platform.J100: AttachmentsConfig(J100Attachment),
Platform.W200: AttachmentsConfig(W200Attachment),
Platform.R100: AttachmentsConfig(R100Attachment),
}

def __new__(cls, platform: str, attachments: dict = None) -> AttachmentsConfig:
Expand Down
64 changes: 64 additions & 0 deletions clearpath_config/platform/attachments/r100.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Software License Agreement (BSD)
#
# @author Luis Camero <lcamero@clearpathrobotics.com>
# @copyright (c) 2023, Clearpath Robotics, Inc., All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Clearpath Robotics nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
from typing import List
from clearpath_config.common.types.accessory import Accessory
from clearpath_config.common.types.platform import Platform
from clearpath_config.platform.types.attachment import BaseAttachment, PlatformAttachment


class R100ArmMount(BaseAttachment):
PLATFORM = Platform.R100
ATTACHMENT_MODEL = "%s.arm_mount" % PLATFORM
FAMS = "fams"
HAMS = "hams"
TOWER = "tower"
MODELS = [FAMS, HAMS, TOWER]
DEFAULT = TOWER
PARENT = "default_mount"

def __init__(
self,
name: str = ATTACHMENT_MODEL,
model: str = DEFAULT,
enabled: bool = BaseAttachment.ENABLED,
parent: str = PARENT,
xyz: List[float] = Accessory.XYZ,
rpy: List[float] = Accessory.RPY
) -> None:
super().__init__(name, model, enabled, parent, xyz, rpy)


# R100 Attachments
class R100Attachment(PlatformAttachment):
PLATFORM = Platform.R100
# Arm Mount
ARM_MOUNT = R100ArmMount.ATTACHMENT_MODEL

TYPES = {
ARM_MOUNT: R100ArmMount
}
5 changes: 5 additions & 0 deletions clearpath_config/platform/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class BatteryConfig(BaseConfig):
ES20_12C = "ES20_12C"
# A200/J100 LiION
HE2613 = "HE2613"
# R100 Lead Acid
DTM8A31 = "8A31DTM"
# W200 Lead Acid
U1_35 = "U1_35"
# W200 LiFEPO4
Expand Down Expand Up @@ -91,6 +93,9 @@ class BatteryConfig(BaseConfig):
Platform.J100: {
HE2613: [S1P1],
},
Platform.R100: {
DTM8A31: [S2P1],
},
Platform.W200: {
U1_35: [S4P3],
NEC_ALM12V35: [S4P3],
Expand Down
17 changes: 17 additions & 0 deletions clearpath_config/platform/extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,22 @@ class ROSParameterDefaults:
"platform_velocity_controller.angular.z.min_acceleration": -25.0,
}

R100 = {
"platform_velocity_controller.wheel_radius": 0.05,
"platform_velocity_controller.linear.x.max_velocity": 1.3,
"platform_velocity_controller.linear.x.min_velocity": -1.3,
"platform_velocity_controller.linear.x.max_acceleration": 1.0,
"platform_velocity_controller.linear.x.min_acceleration": -1.0,
"platform_velocity_controller.linear.y.max_velocity": 1.3,
"platform_velocity_controller.linear.y.min_velocity": -1.3,
"platform_velocity_controller.linear.y.max_acceleration": 1.0,
"platform_velocity_controller.linear.y.min_acceleration": -1.0,
"platform_velocity_controller.angular.z.max_velocity": 4.0,
"platform_velocity_controller.angular.z.min_velocity": -4.0,
"platform_velocity_controller.angular.z.max_acceleration": 2.0,
"platform_velocity_controller.angular.z.min_acceleration": -2.0,
}

W200 = {
"platform_velocity_controller.wheel_radius": 0.3,
"platform_velocity_controller.linear.x.max_velocity": 5.0,
Expand All @@ -124,6 +140,7 @@ class ROSParameterDefaults:
Platform.DO150: DO150,
Platform.J100: J100,
Platform.GENERIC: GENERIC,
Platform.R100: R100,
Platform.W200: W200,
}

Expand Down
16 changes: 8 additions & 8 deletions clearpath_config/sensors/types/cameras.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ class IntelRealsense(BaseCamera):
POINTCLOUD_ENABLED = True

class ROS_PARAMETER_KEYS:
FPS = "camera.rgb_camera.profile"
SERIAL = "camera.serial_no"
CAMERA_NAME = "camera.camera_name"
DEVICE_TYPE = "camera.device_type"
DEPTH_PROFILE = "camera.depth_module.profile"
DEPTH_ENABLE = "camera.enable_depth"
COLOR_ENABLE = "camera.enable_color"
POINTCLOUD_ENABLE = "camera.pointcloud.enable"
FPS = "intel_realsense.rgb_camera.profile"
SERIAL = "intel_realsense.serial_no"
CAMERA_NAME = "intel_realsense.camera_name"
DEVICE_TYPE = "intel_realsense.device_type"
DEPTH_PROFILE = "intel_realsense.depth_module.profile"
DEPTH_ENABLE = "intel_realsense.enable_depth"
COLOR_ENABLE = "intel_realsense.enable_color"
POINTCLOUD_ENABLE = "intel_realsense.pointcloud.enable"

class TOPICS:
COLOR_IMAGE = "color_image"
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>clearpath_config</name>
<version>0.2.7</version>
<version>0.2.8</version>
<description>Clearpath Configuration YAML Parser and Writer</description>
<maintainer email="lcamero@clearpathrobotics.com">Luis Camero</maintainer>
<license>BSD-3</license>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

setup(
name=package_name,
version="0.2.7",
version="0.2.8",
packages=[
package_name,
package_name + ".common",
Expand Down

0 comments on commit 8e6b1f2

Please sign in to comment.