Skip to content

Operation mode manager implementation#656

Merged
eirisak merged 56 commits into
mainfrom
638-task-operation-mode-manager
Feb 18, 2026
Merged

Operation mode manager implementation#656
eirisak merged 56 commits into
mainfrom
638-task-operation-mode-manager

Conversation

@eirisak

@eirisak eirisak commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Added service node:
operation_mode_manager.cpp

Changed joystick interface to make use of the manager

Added Operation mode service request type, aswell as message type to use for the operation mode topic

Changed various dp controls to accomodate these changes.

Added operation mode manager to orca.launch.py

Also added operation mode to stonefish_sim in this pull request:
vortexntnu/vortex-stonefish-sim#18

@eirisak eirisak self-assigned this Jan 8, 2026
@eirisak eirisak linked an issue Jan 8, 2026 that may be closed by this pull request
3 tasks
Comment thread mission/keyboard_joy/keyboard_joy/keyboard_joy_node.py
Comment thread mission/operation_mode_manager/operation_mode_manager/operation_mode_manager.cpp Outdated

@jorgenfj jorgenfj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round of review.

Consider splitting into header and source file, and move declarations into the header file.

Also use spdlog for logging instead of rclcpp. Spdlog gives more readable timestamps. You can look at the dp_adapt_backs_controller package for how to import and use spdlog.

Comment thread mission/operation_mode_manager/operation_mode_manager/operation_mode_manager.cpp Outdated
Comment thread mission/operation_mode_manager/operation_mode_manager/operation_mode_manager.cpp Outdated
Comment thread mission/operation_mode_manager/operation_mode_manager/operation_mode_manager.cpp Outdated
Comment thread mission/operation_mode_manager/operation_mode_manager/operation_mode_manager.cpp Outdated
Comment thread mission/operation_mode_manager/operation_mode_manager/operation_mode_manager.cpp Outdated
Comment thread auv_setup/launch/orca.launch.py Outdated
Comment thread mission/joystick_interface_auv/joystick_interface_auv/joystick_utils.py Outdated
Comment thread mission/operation_mode_manager/src/operation_mode_manager.cpp Outdated
Comment thread mission/operation_mode_manager/src/operation_mode_manager.cpp Outdated
@eirisak eirisak marked this pull request as ready for review January 12, 2026 13:44

@jorgenfj jorgenfj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Service names should be read from orca.yaml the same way topic are to ensure a single source of truth

Comment thread control/pid_controller_dp/src/pid_controller_ros.cpp
Comment thread mission/operation_mode_manager/src/operation_mode_manager.cpp Outdated
Comment thread mission/operation_mode_manager/include/operation_mode_manager.hpp Outdated
Comment thread mission/operation_mode_manager/include/operation_mode_manager.hpp Outdated
Comment thread mission/operation_mode_manager/src/operation_mode_manager.cpp Outdated
Comment thread mission/operation_mode_manager/src/operation_mode_manager.cpp Outdated
Comment thread mission/operation_mode_manager/src/operation_mode_manager.cpp Outdated
} catch (const std::exception& e) {
RCLCPP_ERROR(this->get_logger(),
"Failed to get operation mode: %s", e.what());
killswitch_on_ = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spdlog pls🙏

} catch (const std::exception& e) {
RCLCPP_ERROR(this->get_logger(),
"Failed to get operation mode: %s", e.what());
killswitch_on_ = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spdlog

Comment on lines 112 to 113
RCLCPP_INFO(this->get_logger(), "Killswitch: %s",
killswitch_on_ ? "on" : "off");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spdlog

Comment on lines +119 to +120
RCLCPP_INFO(this->get_logger(), "Operation mode: %s",
vortex::utils::types::mode_to_string(operation_mode_).c_str());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spdlog

Comment on lines +13 to +16
RCLCPP_INFO(
this->get_logger(),
"Operation Mode Manager Node started. Initial mode: %s, Killswitch: %s",
mode_to_string(mode_).c_str(), killswitch_ ? "true" : "false");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spdlog

Comment on lines +102 to +103
RCLCPP_INFO(this->get_logger(), "Mode set to to %s",
mode_to_string(mode_).c_str());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spdlog

Comment on lines +116 to +117
RCLCPP_INFO(this->get_logger(), "Killswitch set to %s",
killswitch_ ? "true" : "false");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spdlog

Comment on lines +135 to +136
RCLCPP_INFO(this->get_logger(), "Killswitch set to %s",
killswitch_ ? "true" : "false");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spdlog

Comment thread mission/operation_mode_manager/package.xml

@jorgenfj jorgenfj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM🎉🎉🎉

@eirisak eirisak merged commit 10e5897 into main Feb 18, 2026
14 checks passed
@eirisak eirisak deleted the 638-task-operation-mode-manager branch February 18, 2026 21:27
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Operation Mode Manager

4 participants