Skip to content

Commit

Permalink
Merge branch 'ros2-add-msgs' into ros2-add-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Dec 13, 2024
2 parents a883dae + dda0d5a commit 45359eb
Show file tree
Hide file tree
Showing 81 changed files with 456 additions and 207 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- unit_test_panther_ros
strategy:
matrix:
repo: [panther_ros, panther_msgs, panther-docker, panther-rpi-os-img]
repo: [panther_ros, panther-docker, panther-rpi-os-img]
steps:
- name: Create test branch
uses: GuillaumeFalourd/[email protected]
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/release-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,6 @@ jobs:
name: Release Husarion UGV project
runs-on: ubuntu-22.04
steps:
- name: Release panther_msgs repository
uses: convictional/[email protected]
with:
owner: husarion
repo: panther_msgs
github_token: ${{ secrets.GH_PAT }}
workflow_file_name: release-repository.yaml
ref: ${{ env.RC_BRANCH_NAME }}
client_payload: |
{
"release_candidate": "${{ env.RC_BRANCH_NAME }}",
"version": "${{ github.event.inputs.version }}",
"release_name": "${{ github.event.inputs.release_name }}",
"automatic_mode": "${{ github.event.inputs.automatic_mode }}",
"prerelease": "${{ github.event.inputs.prerelease }}"
}
- name: Release panther_ros repository
uses: convictional/[email protected]
with:
Expand Down
12 changes: 6 additions & 6 deletions ROS_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Below is information about the physical robot API. For the simulation, topics an
| 🤖 | 🖥️ | Topic | Description |
| --- | --- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
||| `battery/battery_status` | Mean values of both batteries will be published if the robot has two batteries. Otherwise, the state of the single battery will be published.<br/> [*sensor_msgs/BatteryState*](https://docs.ros2.org/latest/api/sensor_msgs/msg/BatteryState.html) |
||| `battery/charging_status` | Battery charging status value.<br/> [*panther_msgs/ChargingStatus*](https://github.com/husarion/panther_msgs) |
||| `battery/charging_status` | Battery charging status value.<br/> [*husarion_ugv_msgs/ChargingStatus*](https://github.com/husarion/husarion_ugv_msgs) |
||| `cmd_vel` | Command velocity value.<br/> [*geometry_msgs/Twist*](https://docs.ros2.org/latest/api/geometry_msgs/msg/Twist.html) |
||| `diagnostics` | Diagnostic data.<br/> [*diagnostic_msgs/DiagnosticArray*](https://docs.ros2.org/latest/api/diagnostic_msgs/msg/DiagnosticArray.html) |
||| `dynamic_joint_states` | Information about the state of various movable joints in a robotic system.<br/> [*control_msgs/DynamicJointState*](https://github.com/ros-controls/control_msgs/blob/master/control_msgs/msg/DynamicJointState.msg) |
Expand All @@ -77,8 +77,8 @@ Below is information about the physical robot API. For the simulation, topics an
||| `gps/time_reference` | The timestamp from the GPS device.<br/> [*sensor_msgs/TimeReference*](https://docs.ros2.org/latest/api/sensor_msgs/msg/TimeReference.html) |
||| `gps/vel` | Velocity output from the GPS device.<br/> [*geometry_msgs/TwistStamped*](https://docs.ros2.org/latest/api/geometry_msgs/msg/TwistStamped.html) |
||| `hardware/e_stop` | Current E-stop state.<br/> [*std_msgs/Bool*](https://docs.ros2.org/latest/api/std_msgs/msg/Bool.html). |
||| `hardware/io_state` | Current IO state.<br/> [*panther_msgs/IOState*](https://github.com/husarion/panther_msgs) |
||| `hardware/robot_driver_state` | Current motor controllers' state and error flags. Subscribed if using Roboteq motor controllers data.<br/> [*panther_msgs/RobotDriverState*](https://github.com/husarion/panther_msgs) |
||| `hardware/io_state` | Current IO state.<br/> [*husarion_ugv_msgs/IOState*](https://github.com/husarion/husarion_ugv_msgs) |
||| `hardware/robot_driver_state` | Current motor controllers' state and error flags. Subscribed if using Roboteq motor controllers data.<br/> [*husarion_ugv_msgs/RobotDriverState*](https://github.com/husarion/husarion_ugv_msgs) |
||| `imu/data` | Filtered IMU data.<br/> [*sensor_msgs/Imu*](https://docs.ros2.org/latest/api/sensor_msgs/msg/Imu.html) |
||| `joint_states` | Provides information about the state of various joints in a robotic system.<br/> [*sensor_msgs/JointState*](https://docs.ros2.org/latest/api/sensor_msgs/msg/JointState.html) |
||| `lights/channel_1_frame` | Frame to be displayed on robot Front Bumper Lights.<br/> [*sensor_msgs/Image*](https://docs.ros2.org/latest/api/sensor_msgs/msg/Image.html) |
Expand All @@ -87,7 +87,7 @@ Below is information about the physical robot API. For the simulation, topics an
||| `odometry/filtered` | Contains information about the filtered position and orientation. When `localization_mode` is `relative`, the position and orientation are relative to the starting point. When `localization_mode` is `enu`, the orientation is relative to the east-north-up (ENU) coordinates.<br/> [*nav_msgs/Odometry*](https://docs.ros2.org/latest/api/nav_msgs/msg/Odometry.html) |
||| `odometry/wheels` | Robot odometry calculated from wheels.<br/> [*nav_msgs/Odometry*](https://docs.ros2.org/latest/api/nav_msgs/msg/Odometry.html) |
||| `robot_description` | Contains information about robot description from URDF file. <br/> [*std_msgs/String*](https://docs.ros2.org/latest/api/std_msgs/msg/String.html) |
||| `system_status` | State of the system, including Built-in Computer's CPU temperature and load. <br/> [*panther_msgs/SystemStatus*](https://github.com/husarion/panther_msgs) |
||| `system_status` | State of the system, including Built-in Computer's CPU temperature and load. <br/> [*husarion_ugv_msgs/SystemStatus*](https://github.com/husarion/husarion_ugv_msgs) |
||| `tf` | Transforms of robot system.<br/> [*tf2_msgs/TFMessage*](https://docs.ros2.org/latest/api/tf2_msgs/msg/TFMessage.html) |
||| `tf_static` | Static transforms of robot system.<br/> [*tf2_msgs/TFMessage*](https://docs.ros2.org/latest/api/tf2_msgs/msg/TFMessage.html) |

Expand Down Expand Up @@ -121,8 +121,8 @@ Below is information about the physical robot API. For the simulation, topics an
||| `hardware/e_stop_trigger` | Triggers E-stop. <br/> [std_srvs/srv/Trigger](https://docs.ros2.org/latest/api/std_srvs/srv/Trigger.html) |
||| `hardware/fan_enable` | Enables or disables fan. <br/> [std_srvs/srv/SetBool](https://docs.ros2.org/latest/api/std_srvs/srv/SetBool.html) |
||| `hardware/motor_power_enable` | Enables or disables motor power. <br/> [std_srvs/srv/SetBool](https://docs.ros2.org/latest/api/std_srvs/srv/SetBool.html) |
||| `lights/set_animation` | Sets LED animation. <br/> [panther_msgs/srv/SetLEDAnimation](https://github.com/husarion/panther_msgs) |
||| `lights/set_animation` | Sets LED animation. <br/> [husarion_ugv_msgs/srv/SetLEDAnimation](https://github.com/husarion/husarion_ugv_msgs) |
||| `localization/enable` | Enable EKF node. <br/> [std_srvs/srv/Empty](https://docs.ros2.org/latest/api/std_srvs/srv/Empty.html) |
||| `lights/set_brightness` | Sets global LED brightness, value ranges from **0.0** to **1.0**. <br/> [panther_msgs/SetLEDBrightness](https://github.com/husarion/panther_msgs) |
||| `lights/set_brightness` | Sets global LED brightness, value ranges from **0.0** to **1.0**. <br/> [husarion_ugv_msgs/SetLEDBrightness](https://github.com/husarion/husarion_ugv_msgs) |
||| `localization/set_pose` | Set pose of EKF node. <br/> [robot_localization/srv/SetPose](https://github.com/cra-ros-pkg/robot_localization/tree/ros2) |
||| `localization/toggle` | Toggle filter processing in the EKF node. <br/> [robot_localization/srv/ToggleFilterProcessing](https://github.com/cra-ros-pkg/robot_localization/tree/ros2) |
4 changes: 0 additions & 4 deletions husarion_ugv/hardware_deps.repos
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ repositories:
type: git
url: https://github.com/husarion/husarion_controllers
version: d184d9b5936ec3f51084b70dc7d3825fa5ecaee0
panther_msgs:
type: git
url: https://github.com/husarion/panther_msgs.git
version: ros2-devel
ros_components_description:
type: git
url: https://github.com/husarion/ros_components_description.git
Expand Down
2 changes: 1 addition & 1 deletion husarion_ugv/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<maintainer email="[email protected]">Husarion</maintainer>
<license>Apache License 2.0</license>

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

Expand Down
10 changes: 3 additions & 7 deletions husarion_ugv/simulation_deps.repos
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ repositories:
type: git
url: https://github.com/husarion/husarion_controllers
version: d184d9b5936ec3f51084b70dc7d3825fa5ecaee0
panther_msgs:
husarion_gz_worlds:
type: git
url: https://github.com/husarion/panther_msgs.git
version: ros2-devel
url: https://github.com/husarion/husarion_gz_worlds.git
version: 9d514a09c74bca2afbfba76cf2c87134918bbf97
ros_components_description:
type: git
url: https://github.com/husarion/ros_components_description.git
Expand All @@ -19,7 +19,3 @@ repositories:
type: git
url: https://github.com/husarion/ros2_controllers/
version: 9da42a07a83bbf3faf5cad11793fff22f25068af
husarion_gz_worlds:
type: git
url: https://github.com/husarion/husarion_gz_worlds.git
version: 9d514a09c74bca2afbfba76cf2c87134918bbf97
10 changes: 5 additions & 5 deletions husarion_ugv_battery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(PACKAGE_DEPENDENCIES
ament_cmake
diagnostic_updater
generate_parameter_library
panther_msgs
husarion_ugv_msgs
husarion_ugv_utils
rclcpp
sensor_msgs)
Expand Down Expand Up @@ -54,7 +54,7 @@ if(BUILD_TESTING)
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(${PROJECT_NAME}_test_battery rclcpp sensor_msgs
panther_msgs)
husarion_ugv_msgs)

ament_add_gtest(${PROJECT_NAME}_test_adc_battery
test/battery/test_adc_battery.cpp src/battery/adc_battery.cpp)
Expand All @@ -63,7 +63,7 @@ if(BUILD_TESTING)
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(${PROJECT_NAME}_test_adc_battery rclcpp sensor_msgs
panther_msgs)
husarion_ugv_msgs)

ament_add_gtest(
${PROJECT_NAME}_test_roboteq_battery test/battery/test_roboteq_battery.cpp
Expand All @@ -72,8 +72,8 @@ if(BUILD_TESTING)
${PROJECT_NAME}_test_roboteq_battery
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(${PROJECT_NAME}_test_roboteq_battery panther_msgs
rclcpp sensor_msgs)
ament_target_dependencies(${PROJECT_NAME}_test_roboteq_battery
husarion_ugv_msgs rclcpp sensor_msgs)

ament_add_gtest(
${PROJECT_NAME}_test_battery_publisher
Expand Down
6 changes: 3 additions & 3 deletions husarion_ugv_battery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Publishes battery state read from ADC unit.
- `_battery/battery_1_status_raw` [*sensor_msgs/BatteryState*]: First battery raw state.
- `_battery/battery_2_status_raw` [*sensor_msgs/BatteryState*]: Second battery raw state. Published if second battery detected.
- `battery/battery_status` [*sensor_msgs/BatteryState*]: Mean values of both batteries if robot has two batteries. Otherwise, the state of the single battery will be published.
- `battery/charging_status` [*panther_msgs/ChargingStatus*]: Battery charging status.
- `battery/charging_status` [*husarion_ugv_msgs/ChargingStatus*]: Battery charging status.
- `diagnostics` [*diagnostic_msgs/DiagnosticArray*]: Battery diagnostic messages.

#### Subscribers

- `hardware/io_state` [*panther_msgs/IOState*]: Current state of IO.
- `hardware/robot_driver_state` [*panther_msgs/RobotDriverState*]: Current motor controllers' state and error flags. Subscribed if using Roboteq motor controllers data.
- `hardware/io_state` [*husarion_ugv_msgs/IOState*]: Current state of IO.
- `hardware/robot_driver_state` [*husarion_ugv_msgs/RobotDriverState*]: Current motor controllers' state and error flags. Subscribed if using Roboteq motor controllers data.

#### Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@

#include "sensor_msgs/msg/battery_state.hpp"

#include "panther_msgs/msg/charging_status.hpp"
#include "husarion_ugv_msgs/msg/charging_status.hpp"

namespace husarion_ugv_battery
{

using BatteryStateMsg = sensor_msgs::msg::BatteryState;
using ChargingStatusMsg = panther_msgs::msg::ChargingStatus;
using ChargingStatusMsg = husarion_ugv_msgs::msg::ChargingStatus;

class Battery
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@

#include "rclcpp/rclcpp.hpp"

#include "panther_msgs/msg/driver_state_named.hpp"
#include "panther_msgs/msg/robot_driver_state.hpp"
#include "husarion_ugv_msgs/msg/driver_state_named.hpp"
#include "husarion_ugv_msgs/msg/robot_driver_state.hpp"

#include "husarion_ugv_battery/battery/battery.hpp"
#include "husarion_ugv_utils/moving_average.hpp"

namespace husarion_ugv_battery
{

using RobotDriverStateMsg = panther_msgs::msg::RobotDriverState;
using DriverStateNamedMsg = panther_msgs::msg::DriverStateNamed;
using RobotDriverStateMsg = husarion_ugv_msgs::msg::RobotDriverState;
using DriverStateNamedMsg = husarion_ugv_msgs::msg::DriverStateNamed;

struct RoboteqBatteryParams
{
Expand Down
Loading

0 comments on commit 45359eb

Please sign in to comment.