Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameter support #112

Merged
merged 14 commits into from
Jan 4, 2023
Merged

Add parameter support #112

merged 14 commits into from
Jan 4, 2023

Conversation

achim-k
Copy link
Collaborator

@achim-k achim-k commented Dec 12, 2022

Public-Facing Changes

  • Adds parameter support

Description
Implements support for parameters which was added to the ws-protocol specification in foxglove/ws-protocol#288

This PR is rather big due to the different implementation of parameters for ROS 1 and ROS 2

ROS 1:

  • Parameters are owned by ROS master
  • Every node can get and set parameters on the master
  • Simple API for setting / getting parameters
    • ros::NodeHandle::getParamNames, ros::NodeHandle::getParam, ros::NodeHandle::setParam

ROS 2 (see also About-ROS-2-Parameters):

  • No single parameter store, parameters are owned by individual nodes
  • Getting / setting parameters of different nodes requires calling services for each involved node:
    • list_parameters, get_parameters, set_parameters

Fixes #9

FG-1203

@achim-k achim-k marked this pull request as draft December 12, 2022 20:05
@achim-k achim-k force-pushed the achim/parameter_support branch 2 times, most recently from c2362ea to 5a2b275 Compare December 20, 2022 18:30
@achim-k achim-k force-pushed the achim/parameter_support branch 3 times, most recently from c6db7cc to 96e67cb Compare January 3, 2023 16:14
@achim-k achim-k marked this pull request as ready for review January 3, 2023 18:21
@achim-k achim-k requested a review from jhurliman January 3, 2023 18:21
@achim-k achim-k changed the title [DRAFT] Add parameter support Add parameter support Jan 3, 2023

auto executor =
rclcpp::executors::MultiThreadedExecutor::make_shared(rclcpp::ExecutorOptions{}, numThreads);

rclcpp_components::ComponentManager componentManager(executor, "ComponentManager");
rclcpp_components::ComponentManager componentManager(executor, "foxglove_component_manager");
Copy link
Contributor

Choose a reason for hiding this comment

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

This may need to be foxglove_bridge_component_manager if it's supposed to be globally unique in the rosgraph, since we may introduce more Foxglove ROS nodes over time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed during rebasing. Since #125 we could actually get rid of the executable, since one can load the compoment directly in a launch file: https://docs.ros.org/en/humble/How-To-Guides/Launching-composable-nodes.html

@achim-k achim-k merged commit 0240a47 into main Jan 4, 2023
@achim-k achim-k deleted the achim/parameter_support branch January 4, 2023 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Parameters: get, set, list, subscribe, unsubscribe
2 participants