Skip to content

Commit f33e8d5

Browse files
committed
Add an API to the primitive options builder for avoiding ROS namespace conventions
Signed-off-by: Michael X. Grey <[email protected]>
1 parent 012ff2e commit f33e8d5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rclrs/src/node/primitive_options.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,15 @@ pub trait IntoPrimitiveOptions<'a>: Sized {
171171
fn liveliness_lease_duration(self, duration: Duration) -> PrimitiveOptions<'a> {
172172
self.liveliness_lease(QoSDuration::Custom(duration))
173173
}
174+
175+
/// [Avoid the ROS namespace conventions][1] for the primitive.
176+
///
177+
/// [1]: QoSProfile::avoid_ros_namespace_conventions
178+
fn avoid_ros_namespace_conventions(self) -> PrimitiveOptions<'a> {
179+
let mut options = self.into_primitive_options();
180+
options.avoid_ros_namespace_conventions = Some(true);
181+
options
182+
}
174183
}
175184

176185
impl<'a> IntoPrimitiveOptions<'a> for PrimitiveOptions<'a> {

0 commit comments

Comments
 (0)