Skip to content

Add starting_up_state parameter to Updater#354

Open
redvinaa wants to merge 4 commits intoros:ros2from
redvinaa:starting-up-state
Open

Add starting_up_state parameter to Updater#354
redvinaa wants to merge 4 commits intoros:ros2from
redvinaa:starting-up-state

Conversation

@redvinaa
Copy link
Copy Markdown

In the current implementation, when the Updater object is constructed, it sends off an "OK" signal. This could be problematic if we consider "Everything is running as expected" (definition of "OK" status as per REP107), that running is already initialized.

The default behavior doesn't change with this PR, so it wouldn't break anything.
Also, in the python implementation, None can be passed to skip "Node starting up" status publishing altogether.

@ct2034 ct2034 self-assigned this Jun 27, 2024
@ct2034 ct2034 added bug This is a bug in the code (and not a new feature) ros2 PR tackling a ROS2 branch labels Jun 27, 2024
@redvinaa
Copy link
Copy Markdown
Author

Hi! Can I get an update on this one?

If it wasn't merged because of this test case failing, can I get some help understanding the error? I'm sure a few minutes of someone who already understands these template-based tests can save me hours of trial and error.
After that I can also rebase to fix the conflict.

@ct2034
Copy link
Copy Markdown
Collaborator

ct2034 commented Feb 10, 2025

Hi @redvinaa.
Could we please have a quick discussion about this? I am not sure if it is worth the extra overhead. Yes,

"Everything is running as expected" (definition of "OK" status as per REP107)

On the other hand, I also would not like my system starting in an error state. Your issue could also be solved by additional state, such as proposed in ros2/common_interfaces#268. What is your opinion about that?

@ct2034 ct2034 added enhancement This tackles a new feature of the code (and not a bug) and removed bug This is a bug in the code (and not a new feature) labels May 26, 2025
@redvinaa
Copy link
Copy Markdown
Author

redvinaa commented Jun 4, 2025

Hi! Sorry for the long delay. It's possible that it would make sense to add new states, but that's a huge change and it appears to be moving very slowly. This PR on the other hand is not breaking, and I think is still useful until the new states get added.

@redvinaa redvinaa force-pushed the starting-up-state branch from 692fd7c to 687c0c4 Compare April 20, 2026 13:58
Comment on lines +196 to +198
if (starting_up_status_ < 0) {
return;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what is the purpose of this line?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't remember anymore, removing

@ct2034 ct2034 added the backport Mergify will try to backport this. (WIP / Testing the functionality) label Apr 20, 2026
explicit Updater(NodeT node, double period = 1.0)
explicit Updater(
NodeT node, double period = 1.0,
int starting_up_status = diagnostic_msgs::msg::DiagnosticStatus::OK)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
int starting_up_status = diagnostic_msgs::msg::DiagnosticStatus::OK)
unsigned char starting_up_status = diagnostic_msgs::msg::DiagnosticStatus::OK)

std::shared_ptr<rclcpp::node_interfaces::NodeTopicsInterface> topics_interface,
double period = 1.0);
double period = 1.0,
int starting_up_status = diagnostic_msgs::msg::DiagnosticStatus::OK);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
int starting_up_status = diagnostic_msgs::msg::DiagnosticStatus::OK);
unsigned char starting_up_status = diagnostic_msgs::msg::DiagnosticStatus::OK);

rclcpp::Publisher<diagnostic_msgs::msg::DiagnosticArray>::SharedPtr publisher_;
rclcpp::Logger logger_;

int starting_up_status_;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
int starting_up_status_;
unsigned char starting_up_status_;

std::shared_ptr<rclcpp::node_interfaces::NodeTopicsInterface> topics_interface, double period)
std::shared_ptr<rclcpp::node_interfaces::NodeTopicsInterface> topics_interface,
double period,
int starting_up_status)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
int starting_up_status)
unsigned char starting_up_status)

@ct2034 ct2034 added the needs more work Someone has worked on this but more work is needed label Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Mergify will try to backport this. (WIP / Testing the functionality) enhancement This tackles a new feature of the code (and not a bug) needs more work Someone has worked on this but more work is needed ros2 PR tackling a ROS2 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants