Hi , I'm trying to start a discussion about what type should uint8[] be converted to
Background:
In ROS1 , `uint8[]` is transported into `string` while other `uint` is transported to `list` .
In Ros 2 , all the `uint` types are transported into list.
But in our tests , we find that when we transport the images using uint8 , the `list` type shows high latency , cause the transport to `list` takes a lot of time
So we changed some codes and transport the `uint8` type to `bytes` and test again , the result is much better
Test comparison result:
copy data in cpp to `list` : 10ms
transport 2M image in ROS2 in type `list` in python : 270ms
copy data in cpp tp 'byte' : 0-1ms
transport 2M image in ROS2 using cv_bridge in type 'bytes' in python : 10ms
issue description :
In our program , low time latency is very important , and bytes is more suitable in python too .
So whether it's better to let the `uint8`` type convert to `bytes` instead of `list` in ROS2.
(Just like in ROS)
Our attempts
1. change the code in rosidl to make `uint8` convert to `bytes`` directly
2. trying to add a new Primitive type like `imguint8` to convert to `bytes` and `uint8` is still `list` , but i have some problems in codes
link to the [attempt 2](
https://discourse.ros.org/t/discussion-about-how-to-add-a-new-primitive-types-to-rosidl-msg/4607/6)
Opinion Invitation:
@dirk-thomas
@marguedas
Appreciating your opinion !
---
[Visit Topic](
https://discourse.ros.org/t/discussion-about-uint8-type-transport-in-ros2-python/4633/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
ros-users@lists.ros.org
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <
http://lists.ros.org/mailman//options/ros-users>