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

ROS2 interface for the RoadNetwork #1

Open
4 of 22 tasks
agalbachicar opened this issue Dec 27, 2022 · 4 comments
Open
4 of 22 tasks

ROS2 interface for the RoadNetwork #1

agalbachicar opened this issue Dec 27, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@agalbachicar
Copy link
Collaborator

agalbachicar commented Dec 27, 2022

Desired behavior

Provide a ROS2 interface for the maliput::api::RoadNetwork.

The following is a list of characteristics we want:

  • It must be a query - response via ROS2 services.
  • It must be able to load RoadNetworks by means of ROS parameters (YAML description) or via a service call as well.
  • It must be a component, and provide some launchfiles for easy use and integration into other systems.
  • There must be an executable to trigger with ros2 run
  • A data translation layer is desired to make this query entity as reusable as possible for future integrations.

Implementation suggestion

The following suggests a feature complete list of tasks.

Additional context

This is a required interface to enable multi-agent simulation with ROS2 based systems that will help to spread the use of maliput with other development environments.

@agalbachicar agalbachicar added the enhancement New feature or request label Dec 27, 2022
@agalbachicar agalbachicar self-assigned this Dec 27, 2022
@francocipollone
Copy link
Contributor

francocipollone commented Dec 27, 2022

It must be able to load RoadNetworks by means of ROS parameters (YAML description) or via a service call as well.

As the ROS parameters will be variable: (It will depend on each backend): I imagine a couple of options:

A: Follow a nomenclature:

ros2_maliput:
    ros__parameters:
        maliput_backend: "maliput_malidrive"
        number_of_parameters: 2
        parameter_1:
          key: linear_tolerance
          value: 1
        parameter_2:
          key: angular_tolerance
          value: 1

B: Pass a path to the yaml file where the parameters are later on loaded:

ros2_maliput:
    ros__parameters:
        maliput_backend: "maliput_malidrive"  // Could be omitted if added in next file.
        configuration_path: "my_parameters.yaml"

And this will be loaded using yaml-cpp lib, not using ROS parameters interface.

my_parameters.yaml:

ros2_maliput:
    maliput_backend: "maliput_malidrive"  // Could be omitted if added in ros_param
    parameters:
         <key_1>: <value_1>
         <key_2>: <value_2>
          ...
         <key_N>: <value_N>

@agalbachicar
Copy link
Collaborator Author

Some design comments after talking with @francocipollone :

  • To load RoadNetworks, use CreateRoadNetwork() function from the plugin interface as it hides all the unnecessary complexity.
  • To load the parameters that will end up being a std::map<string,string> as a second argument of the aforementioned function, the best thing is to clone the recent implementation from maliput_viz.
  • We should better keep two entities separated:
    • MaliputQuery which is a class that will manage the direct and high level queries to the RoadNetwork.
    • MaliputRosNode which is a proper ROS2 node that will follow the style of ROS2 in terms of API, lifecycle and error management and reporting. Initially, we will inject a MaliputQuery into a MaliputRosNode. We will manage the impendance mismatch between the maliput and the ROS2 world within the node class.

@agalbachicar
Copy link
Collaborator Author

MaliputRosNode must subclass rclcpp_lifecycle::LifecycleNode to properly manage initialization and further node management as a component. Some links for future reference:

@agalbachicar
Copy link
Collaborator Author

I think this first milestone of having the RoadGeometry and some basic routing support is enough to test it with some integration examples with agents before proceeding and iterating on something more complex with the rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants