Skip to content

Commit

Permalink
Initial clearpath_motor_msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-camero committed Sep 27, 2024
1 parent b130076 commit 2870f04
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 0 deletions.
28 changes: 28 additions & 0 deletions clearpath_motor_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.5)
project(clearpath_motor_msgs)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(action_msgs REQUIRED)
find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
msg/PumaFeedback.msg
msg/PumaStatus.msg
msg/PumaMultiFeedback.msg
msg/PumaMultiStatus.msg
DEPENDENCIES action_msgs std_msgs builtin_interfaces
)

ament_export_dependencies(rosidl_default_runtime)
ament_package()
24 changes: 24 additions & 0 deletions clearpath_motor_msgs/msg/PumaFeedback.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Number on the bus (CAN ID).
uint8 device_number

# Name of joint controlled, or other identifier.
string device_name

# Duty cycle of the h-bridge driver (-1..1).
float32 duty_cycle

# Current consumed (amps).
float32 current

# Travel as measured by the encoder (rad).
float64 travel

# Angular velocity as measured by the encoder (rad/s).
float64 speed

# The reported setpoint value of the on-board controller for the given mode.
# In voltage control, duty cycle of the h-bridge driver (-1..1).
# In speed control, angular velocity setpoint of the on-board controller (rad/s).
# In position control, travel as measured by the encoder (rad).
# In current control, the current consumed (amps).
float64 setpoint
3 changes: 3 additions & 0 deletions clearpath_motor_msgs/msg/PumaMultiFeedback.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

clearpath_motor_msgs/PumaFeedback[] drivers_feedback
3 changes: 3 additions & 0 deletions clearpath_motor_msgs/msg/PumaMultiStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

clearpath_motor_msgs/PumaStatus[] drivers
33 changes: 33 additions & 0 deletions clearpath_motor_msgs/msg/PumaStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Number on the bus (CAN ID).
uint8 device_number

# Name of joint controlled, or other identifier.
string device_name

# Input terminal voltage (volts).
float32 bus_voltage

# Internal driver temperature (degC).
float32 temperature

# Voltage as output to the motor (volts).
float32 output_voltage

# Value of the auxiliary ADC (volts).
float32 analog_input

# Available control modes, not all of which are broken out to
# this ROS driver.
uint8 MODE_VOLTAGE=0
uint8 MODE_CURRENT=1
uint8 MODE_SPEED=2
uint8 MODE_POSITION=3
uint8 MODE_VCOMP=4
uint8 mode

# Fault states which could cause the driver to be immobilized.
uint8 FAULT_CURRENT=1
uint8 FAULT_TEMPERATURE=2
uint8 FAULT_BUS_VOLTAGE=4
uint8 FAULT_BRIDGE_DRIVER=8
uint8 fault
29 changes: 29 additions & 0 deletions clearpath_motor_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>clearpath_motor_msgs</name>
<version>0.3.0</version>
<description>Messages for Clearpath Motor Drivers.</description>
<license>BSD</license>

<author email="[email protected]">Mike Purvis</author>

<maintainer email="[email protected]">Roni Kreinin</maintainer>
<maintainer email="[email protected]">Tony Baltovski</maintainer>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>action_msgs</depend>
<depend>std_msgs</depend>
<depend>builtin_interfaces</depend>

<build_depend>rosidl_default_generators</build_depend>

<exec_depend>rosidl_default_runtime</exec_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>

0 comments on commit 2870f04

Please sign in to comment.