Skip to content

Commit

Permalink
Merge pull request #16 from husarion/ros2-update-panther-msgs
Browse files Browse the repository at this point in the history
ROS 2 update panther msgs
  • Loading branch information
pkowalsk1 committed Oct 19, 2023
2 parents fc9fdff + dababae commit ba9c388
Show file tree
Hide file tree
Showing 17 changed files with 104 additions and 28 deletions.
27 changes: 18 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
cmake_minimum_required(VERSION 3.5)

cmake_minimum_required(VERSION 3.10.2)
project(panther_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(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/LightsMessage.msg"
DEPENDENCIES builtin_interfaces std_msgs
"msg/DriverState.msg"
"msg/FaultFlag.msg"
"msg/IOState.msg"
"msg/LEDAnimation.msg"
"msg/LEDAnimationQueue.msg"
"msg/LEDImageAnimation.msg"
"msg/MotorControllerState.msg"
"msg/MotorState.msg"
"msg/RuntimeError.msg"
"msg/ScriptFlag.msg"
"msg/SystemStatus.msg"
"srv/SetLEDAnimation.srv"
"srv/SetLEDBrightness.srv"
"srv/SetLEDImageAnimation.srv"
DEPENDENCIES std_msgs
)

ament_export_dependencies(rosidl_default_runtime)

ament_package()
ament_package()
4 changes: 4 additions & 0 deletions msg/DriverState.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
std_msgs/Header header

panther_msgs/MotorControllerState front
panther_msgs/MotorControllerState rear
9 changes: 9 additions & 0 deletions msg/FaultFlag.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
bool can_net_err
bool overheat
bool overvoltage
bool undervoltage
bool short_circuit
bool emergency_stop
bool motor_or_sensor_setup_fault
bool mosfet_failure
bool default_config_loaded_at_startup
7 changes: 7 additions & 0 deletions msg/IOState.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bool aux_power
bool charger_connected
bool charger_enabled
bool digital_power
bool fan
bool motor_on
bool power_button
13 changes: 13 additions & 0 deletions msg/LEDAnimation.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
uint16 E_STOP = 0
uint16 READY = 1
uint16 ERROR = 2
uint16 MANUAL_ACTION = 3
uint16 AUTONOMOUS_ACTION = 4
uint16 GOAL_ACHIEVED = 5
uint16 LOW_BATTERY = 6
uint16 CRITICAL_BATTERY = 7
uint16 BATTERY_STATE = 8
uint16 CHARGING_BATTERY = 9

uint16 id
string param
1 change: 1 addition & 0 deletions msg/LEDAnimationQueue.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
string[] queue
5 changes: 5 additions & 0 deletions msg/LEDImageAnimation.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
string image
float32 duration
float32 brightness
uint8 repeat
uint32 color
12 changes: 0 additions & 12 deletions msg/LightsMessage.msg

This file was deleted.

7 changes: 7 additions & 0 deletions msg/MotorControllerState.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
float32 voltage
float32 current
float32 temperature
panther_msgs/FaultFlag fault_flag
panther_msgs/ScriptFlag script_flag
panther_msgs/MotorState left_motor
panther_msgs/MotorState right_motor
2 changes: 2 additions & 0 deletions msg/MotorState.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
string motor_joint_name
panther_msgs/RuntimeError runtime_error
7 changes: 7 additions & 0 deletions msg/RuntimeError.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bool amps_limit_active
bool motor_stall
bool loop_error
bool safety_stop_active
bool forward_limit_triggered
bool reverse_limit_triggered
bool amps_trigger_activated
3 changes: 3 additions & 0 deletions msg/ScriptFlag.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bool loop_error
bool encoder_disconected
bool amp_limiter
7 changes: 7 additions & 0 deletions msg/SystemStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
std_msgs/Header header

float32[] cpu_percent
float32 cpu_temp
float32 avg_load_percent
float32 ram_usage_percent
float32 disc_usage_percent
12 changes: 5 additions & 7 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>panther_msgs</name>
<version>0.0.0</version>
<description>
Custom messages for Panther robot.
</description>

<version>0.0.1</version>
<description>Custom messages for Panther robot.</description>
<maintainer email="[email protected]">Husarion</maintainer>

<license>Apache License 2.0</license>

<url type="website">https://husarion.com/</url>
<url type="repository">https://github.com/husarion/panther_msgs/tree/ros2</url>
<url type="bugtracker">https://github.com/husarion/panther_msgs/issues</url>

<author email="[email protected]">Dawid Kmak</author>
<author email="[email protected]">Krzysztof Wojciechowski</author>

<buildtool_depend>ament_cmake</buildtool_depend>
Expand Down
5 changes: 5 additions & 0 deletions srv/SetLEDAnimation.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
panther_msgs/LEDAnimation animation
bool repeating
---
bool success
string message
4 changes: 4 additions & 0 deletions srv/SetLEDBrightness.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
float32 data
---
bool success
string message
7 changes: 7 additions & 0 deletions srv/SetLEDImageAnimation.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
panther_msgs/LEDImageAnimation front
panther_msgs/LEDImageAnimation rear
bool interrupting
bool repeating
---
bool success
string message

0 comments on commit ba9c388

Please sign in to comment.