ros2_rust icon indicating copy to clipboard operation
ros2_rust copied to clipboard

Improve message generation

Open ruffsl opened this issue 6 years ago • 3 comments

Having to include and recompile all the message types any rust project requires is kind of a non-starter:

"Ain't Nobody Got Time for That" ~ Kimberly "Sweet Brown" Wilkins

Are there anyways we can improve upon this, like upstreaming rosidl_generator_rs as one of the default IDL generators, or reusing IDL files generated from rosidl_generator_c? How have other client libraries such as rclpy worked around this? Are there memory safety considerations we should account for? Already I've encountered memory leaks using rclrs that could have been prevented by rustc and RAII.

ruffsl avatar Mar 05 '19 21:03 ruffsl

How have other client libraries such as rclpy worked around this?

I can't speak for other client libraries, but definitely can for rclpy. rclpy hasn't worked around this issue, it just happens to be included upstream, but there are no mechanisms in rclpy for not regenerating messages.

Are there memory safety considerations we should account for? Already I've encountered memory leaks using rclrs that could have been prevented by rustc and RAII.

Could you file a ticket with an example so we can address this? Thanks.

esteve avatar Mar 19 '19 10:03 esteve

Having to include and recompile all the message types any rust project requires is kind of a non-starter

I'm not sure if we should try to do something about this (not sure if it's possible?), or simply hope we'll get included into ROS 2 proper and have rosidl_generator_rs become a default generator.

The other points in this issue have been addressed, I think.

nnmm avatar Apr 22 '22 21:04 nnmm

@esteve what do you think about my previous comment? Can this issue be closed as "won't fix until rosidl_generator_rs is included in the ROS 2 distribution?"

nnmm avatar May 28 '22 07:05 nnmm