Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,3 @@ jobs:
}
colcon-mixin-name: coverage-gcc
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- name: Codecov
uses: codecov/codecov-action@v5.4.0
with:
files: ros_ws/lcov/total_coverage.info
flags: unittests
name: codecov-umbrella
# yml: ./codecov.yml
fail_ci_if_error: false
20 changes: 5 additions & 15 deletions .github/workflows/rolling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ on:
- rolling
jobs:
build-and-test:
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
container:
image: ubuntu:noble
image: ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-ubuntu-resolute-ros-rolling-ros-base:master
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: rolling
- name: Setup ROS 2
uses: ros-tooling/setup-ros@0.7.15
- name: build and test
uses: ros-tooling/action-ros-ci@0.4.5
uses: ros-tooling/action-ros-ci@0.4.8
with:
package-name: roboligo roboligo_cli roboligo_common roboligo_connector roboligo_interfaces roboligo_states roboligo_system roboligo_connector_mavros roboligo_robot_drone
target-ros2-distro: rolling
Expand All @@ -30,12 +28,4 @@ jobs:
}
}
colcon-mixin-name: coverage-gcc
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- name: Codecov
uses: codecov/codecov-action@v5.4.0
with:
files: ros_ws/lcov/total_coverage.info
flags: unittests
name: codecov-umbrella
# yml: ./codecov.yml
fail_ci_if_error: false
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
7 changes: 5 additions & 2 deletions roboligo/launch/roboligo.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

from launch import LaunchDescription
from launch_ros.actions import Node
from launch.actions import ExecuteProcess

def generate_launch_description():

Expand All @@ -28,10 +29,12 @@ def generate_launch_description():
package="roboligo_system",
executable="roboligo_main",
output="screen",
parameters=[
params_file,
arguments=[
'--ros-args',
'--params-file', params_file,
],
)


ld = LaunchDescription()
ld.add_action(roboligo)
Expand Down
5 changes: 5 additions & 0 deletions roboligo/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@

<buildtool_depend>ament_cmake</buildtool_depend>


<depend>roboligo_common</depend>
<depend>roboligo_system</depend>
<depend>roboligo_cli</depend>
<depend>roboligo_connector</depend>
<depend>roboligo_interfaces</depend>
<depend>roboligo_states</depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
1 change: 1 addition & 0 deletions roboligo/params/drone.params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ connector_node:
connector_types: [mavros]
mavros:
plugin: roboligo_connector_mavros/RoboligoConnectorMavros
init_alt: 0.75

roboligo_node:
ros__parameters:
Expand Down
2 changes: 2 additions & 0 deletions roboligo_cli/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>ament_xmllint</test_depend>
<test_depend>ament_pytest</test_depend>
<test_depend>python3-pytest</test_depend>

<export>
<build_type>ament_python</build_type>
Expand Down
9 changes: 6 additions & 3 deletions roboligo_cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from setuptools import find_packages
from setuptools import setup

package_name = 'roboligo_cli'

setup(
name=package_name,
version='0.0.0',
packages=find_packages(exclude=['test']),
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
install_requires=['ros2cli'],
zip_safe=True,
author='Juan S. Cely G.',
Expand All @@ -37,7 +41,6 @@
long_description="""\
roboligo cli: roboligo cli tools to manage robots.""",
license='Apache License 2.0',
tests_require=['pytest'],
entry_points={
'ros2cli.command': [
'roboligo = roboligo_cli.command.roboligo:RoboligoCommand',
Expand Down
Empty file added roboligo_cli/test/__init__.py
Empty file.
24 changes: 24 additions & 0 deletions roboligo_cli/test/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2026 Juan S. Cely G.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import importlib
import unittest


class TestRoboligoCli(unittest.TestCase):

def test_import(self):
"""Test that the package can be imported."""
module = importlib.import_module("roboligo_cli")
self.assertIsNotNone(module)
Original file line number Diff line number Diff line change
Expand Up @@ -24,66 +24,66 @@
#include "roboligo_common/classification/Trigger.hpp"
#include "roboligo_common/types/RobotState.hpp"

namespace roboligo
namespace roboligo
{
/**
* @class ClassificationBase
* @brief Base class for classification plugins in the Roboligo system.
*
*
* ClassificationBase provides an abstract interface for implementing classification
* functionality within the robot control framework. It inherits from PluginBase and
* follows a plugin architecture pattern, allowing extensibility through derived classes.
*/
class ClassificationBase : public PluginBase
{
public:
class ClassificationBase : public PluginBase
{
public:
/**
* @brief constructor
*/
ClassificationBase() = default;
ClassificationBase() = default;

/**
* @brief Destructor
*/
virtual ~ClassificationBase() = default;
virtual ~ClassificationBase() = default;

/**
* @brief Initializes the classification plugin.
* @param parent_node Shared pointer to the lifecycle node managing this plugin.
* @param plugin_name Name identifier for this plugin instance.
*/
virtual void initialize(
const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node,
const std::string & plugin_name);
virtual void initialize(
const std::shared_ptr<rclcpp_lifecycle::LifecycleNode> parent_node,
const std::string & plugin_name);

/**
* @brief Sets the robot state classification.
* @param robot_state Reference to the robot state to classify.
* @return True if the operation succeeded, false otherwise.
*/
virtual bool set(RobotState & robot_state);
virtual bool set(RobotState & robot_state);

/**
* @brief Updates the robot state classification.
* @param robot_state Reference to the robot state to update.
* @return True if the operation succeeded, false otherwise.
*/
virtual bool update(RobotState & robot_state);
virtual bool update(RobotState & robot_state);

protected:
protected:
/**
* @brief Called when setting robot state (override in derived classes).
* @param robot_state Reference to the robot state being set.
*/
virtual void on_set([[maybe_unused]]RobotState & robot_state){}
virtual void on_set([[maybe_unused]] RobotState & robot_state) {}

/**
* @brief Called when updating robot state (override in derived classes).
* @param robot_state Reference to the robot state being updated.
*/
virtual void on_update([[maybe_unused]]RobotState & robot_state){}
virtual void on_update([[maybe_unused]] RobotState & robot_state) {}

};
};

} // namespace roboligo
#endif // ROBOLIGO_COMMON_CLASSIFICATION__CLASSIFICATIONBASE_HPP_
#endif // ROBOLIGO_COMMON_CLASSIFICATION__CLASSIFICATIONBASE_HPP_
38 changes: 19 additions & 19 deletions roboligo_common/include/roboligo_common/classification/Mode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,68 +22,68 @@ namespace roboligo
/**
* @class Mode
* @brief Represents a configurable mode with name, value, and active status.
*
*
* This class encapsulates mode information including a name identifier,
* a value representation, and an active status flag. It provides methods
* to get and set these properties.
*/
class Mode
{
public:
class Mode
{
public:
/**
* @brief Constructs a Mode object with the specified name and value.
* @param name The mode name identifier
* @param value The mode value representation
*/
Mode(std::string name, std::string value)
:name_(name), value_(value) {}
Mode(std::string name, std::string value)
:name_(name), value_(value) {}

/**
* @brief Virtual destructor for proper cleanup of derived classes.
*/
virtual ~Mode() = default;
virtual ~Mode() = default;

/**
* @brief Gets the mode name.
* @return The name of the mode
*/
std::string get_name(void);
std::string get_name(void);

/**
* @brief Gets the mode value.
* @return The value associated with the mode
*/
std::string get_value(void);
std::string get_value(void);

/**
* @brief Sets the mode name.
* @param new_name The new mode name
*/
void set_name(std::string new_name);
void set_name(std::string new_name);

/**
* @brief Sets the mode value.
* @param new_value The new mode value
*/
void set_value(std::string new_value);
void set_value(std::string new_value);

/**
* @brief Checks if the mode is active.
* @return True if the mode is active, false otherwise
*/
bool is_ative(void);
bool is_ative(void);

/**
* @brief Sets the active status of the mode.
* @param status The new active status
*/
void set_active(bool status);
void set_active(bool status);

protected:
std::string name_{"base_mode"}; ///< Mode name identifier
std::string value_{"MODE"}; ///< Mode value representation
bool active_{false}; ///< Active status flag
};
protected:
std::string name_{"base_mode"}; ///< Mode name identifier
std::string value_{"MODE"}; ///< Mode value representation
bool active_{false}; ///< Active status flag
};

} // namespace roboligo
#endif // ROBOLIGO_COMMON_CLASSIFICATION__MODE_HPP_
#endif // ROBOLIGO_COMMON_CLASSIFICATION__MODE_HPP_
Loading
Loading