ros2 / design

Design documentation for ROS 2.0 effort
http://design.ros2.org/
Apache License 2.0
224 stars 192 forks source link

Adds ROS 2 launch XML format design document #207

Closed hidmic closed 5 years ago

hidmic commented 5 years ago

This pull request is the v0.1.0 draft of an XML format for the ROS 2 launch system.

~Currently just mostly keeping portability with ROS 1.~ It includes all relevant features for the first milestone on ROS 2 launch front-ends.

hidmic commented 5 years ago

FYI I just collapsed the <params> tag into the <param> to make things slightly more homogeneous and thus easier to deal with in the implementation (which I'm thinking of and drafting some considerations and hints for).

hidmic commented 5 years ago

We should also add in launch.frontend a way of allowing overriding exposed actions and substitutions (which is a little tricky).

Hmm, I see why, but I wonder if what this is actually telling us is that we need namespaced tags e.g. <ros::group/> vs. <group/> in XML.

I think that we can delete it from the design document at the moment, and address it in a follow up.

I'm also inclined to defer this till the next iteration, along with event handlers.

ivanpauno commented 5 years ago

Hmm, I see why, but I wonder if what this is actually telling us is that we need namespaced tags e.g. <ros::group/> vs. <group/> in XML.

That sounds like a great idea. I would like to see a using tag too (<using name="ros"/>). Handling overrides will be easy.

I'm also inclined to defer this till the next iteration, along with event handlers.

Sure, I will delete event handlers and ros-namespaces from the document. We can add them in the next iteration.

wjwwood commented 5 years ago

So it just boil down to this:

<group ns="my_ns">
</group>

Versus this:

<group>
  <let name="ros_namespace" value="$(var ros_namespace)/my_namespace"/>
</group>

I think we could have something like this:

<group>
  <push_ros_namespace namespace="my_namespace"/>
  ...
</group>

And that would be sufficient.

If we really want to have it as an attribute of <group> then I think you guys have identified one way which is to have <group> and <ros::group> where the latter can override the first if you do something like <using name="ros::group"/> or <using namespace="ros"/>. Another option would be to extend <group> directly, so that if you have launch_ros_xml, it adds acceptable attributes to <group>, like the ns one, through some extensibility interface.

ivanpauno commented 5 years ago

I think we could have something like this:

<group>
  <push_ros_namespace namespace="my_namespace"/>
  ...
</group>

Yes, that one would be easy to implement, and less verbose than my option.

If we really want to have it as an attribute of <group> then I think you guys have identified one way which is to have <group> and <ros::group> where the latter can override the first if you do something like <using name="ros::group"/> or <using namespace="ros"/>. Another option would be to extend <group> directly, so that if you have launch_ros_xml, it adds acceptable attributes to <group>, like the ns one, through some extensibility interface.

I think the namespace option would be really nice, because it avoids the possibility of name collisions. But, it's harder to implement.

For the moment I will add a push_ros_namespace action. I think we can merge the document as-is and update it later.

hidmic commented 5 years ago

+1 to push_ros_namespace for now and deferring namespace/extension discussions to the next iteration.

ivanpauno commented 5 years ago

With https://github.com/ros2/launch/pull/272 and https://github.com/ros2/launch/pull/273, we will have exactly the functionality described in this document.