[ros-users] [Discourse.ros.org] [Next Generation ROS] Discus…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Zongpei Jiang via ros-users
Date:  
To: ros-users
CC: Zongpei Jiang
Subject: [ros-users] [Discourse.ros.org] [Next Generation ROS] Discussion about how to add a new PRIMITIVE_TYPES to rosidl(msg)


Hi , I'm working on adding a new type (e.g. `new_uint8`) to `PRIMITIVE_TYPES` in `rosidl` , cause i want to do some extra operations on the `uint8[]` data but i don't want to effect the original `uint8` type

For example , in rosidl/rosidl_generator_py/resource/_msg_support.c.em , i can change the `new_uint8` type to `bytes` instead of `list` when i received the msgs

I have looked some relative codes , and i find this in ` rosidl/rosidl_parser/rosidl_parser/__init__.py`


> PRIMITIVE_TYPES = [

    'bool',
    'byte',
    'char',
    # TODO reconsider wchar
    'float32',
    'float64',
    'int8',
    'uint8',
    'int16',
    'uint16',
    'int32',
    'uint32',
    'int64',
    'uint64',
    'string',
    # TODO reconsider wstring / u16string / u32string
    # TODO duration and time
    'duration',  # for compatibility only
    'time',  # for compatibility only
]


So i guess it's possible to add a new type

But i don't know whether there are other codes i need to consider , besides the `rosidl_parser` and `/rosidl_generator_py/resource/_msg_support.c.em`

Looking forward to some suggestions !
Thanks !





---
[Visit Topic](https://discourse.ros.org/t/discussion-about-how-to-add-a-new-primitive-types-to-rosidl-msg/4607/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list

http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>