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 complete support for ROS2 interface definition #420

Open
ChrisTimperley opened this issue Oct 16, 2020 · 4 comments
Open

Add complete support for ROS2 interface definition #420

ChrisTimperley opened this issue Oct 16, 2020 · 4 comments
Assignees
Labels
bug Something isn't working ros2

Comments

@ChrisTimperley
Copy link
Member

ChrisTimperley commented Oct 16, 2020

The current message file parser doesn't recognise this, and so it crashes on any message fields that include optional default values. This feature appears to have been introduced in ROS2.

https://design.ros2.org/articles/legacy_interface_definition.html

An example of such a message file for rcl_interfaces/ParameterDescriptor:

# This is the message to communicate a parameter's descriptor.

string name

# Enum values are defined in the `ParameterType.msg` message.
uint8 type

# Description of the parameter, visible from introspection tools.
string description

# Parameter constraints

# Plain English description of additional constraints which cannot be expressed
# with the available constraints, e.g. "only prime numbers".
# By convention, this should only be used to clarify constraints which cannot
# be completely expressed with the parameter constraints below.
string additional_constraints

# If 'true' then the value cannot change after it has been initialized.
bool read_only false


# If any of the following sequences are not empty, then the constraint inside of
# them apply to this parameter.

# FloatingPointRange consists of a from_value, a to_value, and a step.
# FloatingPointRange and IntegerRange are mutually exclusive.
FloatingPointRange[<=1] floating_point_range

# IntegerRange consists of a from_value, a to_value, and a step.
# FloatingPointRange and IntegerRange are mutually exclusive.
IntegerRange[<=1] integer_range
@ChrisTimperley ChrisTimperley added the bug Something isn't working label Oct 16, 2020
@ChrisTimperley ChrisTimperley self-assigned this Oct 16, 2020
@schmerl
Copy link
Collaborator

schmerl commented Jan 13, 2021

To get a start on this, I think we need to:

  1. Refactor common/package.py to make Package an interface
  2. Move the current implementation into ROS1Package
  3. Hook them into ROS1Package
  4. ActionFormat into interface and ROS1 / ROS2 instances.
  5. SrvFormat into interface and ROS1 / ROS2 instances.
  6. Split MsgFromat into interface and ROS1 / ROS2 instances.
  7. Hook this in
  8. Create ROS2Package that uses the new formats
  9. Hook this into the ROS2 specific stuff

@schmerl
Copy link
Collaborator

schmerl commented Jan 13, 2021

@schmerl
Copy link
Collaborator

schmerl commented Jan 13, 2021

@schmerl
Copy link
Collaborator

schmerl commented Jan 18, 2021

#394

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ros2
Projects
None yet
Development

No branches or pull requests

2 participants