Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 3.34 KB

CartesianTrajectoryConstraint.md

File metadata and controls

25 lines (19 loc) · 3.34 KB

class CartesianTrajectoryConstraint

Member values

Member name Data type Description
speed oneof:type CartesianSpeed Speed constraint
duration oneof:type float32 Duration constraint (in seconds) (not implemented yet)

Member functions

Function name Return type Input type Description
has_speed() const void void Returns the current value of the field if oneof case is kSpeed. Otherwise, returns oneof:type CartesianSpeed::default_instance()
speed() const const oneof:type CartesianSpeed& void Returns the current value of the field if oneof case is kSpeed
mutable_speed() oneof:type CartesianSpeed* void If any other oneof field in the same oneof is set, calls clear_type(). Sets the oneof case to kSpeed and returns a pointer to the mutable oneof:type CartesianSpeed object that stores the field's value. If the oneof case was not kSpeed prior to the call, then the returned oneof:type CartesianSpeed will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:type CartesianSpeed). After calling this, has_speed() will return true, speed() will return a reference to the same instance of oneof:type CartesianSpeed and type_case() will return kSpeed
clear_speed() void void Nothing will be changed if the oneof case is not kSpeed. If the oneof case equals kSpeed, frees the field and clears the oneof case. has_speed() will return false, speed() will return the default value and type_case() will return TYPE_NOT_SET.
set_allocated_speed() void oneof:type CartesianSpeed* Calls clear_type(). If the oneof:type CartesianSpeed pointer is not NULL: Sets the oneof:type CartesianSpeed object to the field and sets the oneof case to kSpeed. The message takes ownership of the allocated oneof:type CartesianSpeed object, has_speed() will return true and type_case() will return kSpeed. If the pointer is NULL, has_speed() will return false and type_case() will return TYPE_NOT_SET. (The behavior is like calling clear_type())
release_speed() oneof:type CartesianSpeed* void Returns NULL if oneof case is not kSpeed. If the oneof case is kSpeed, clears the oneof case, releases the ownership of the field and returns the pointer of the type object. After calling this, caller takes the ownership of the allocated type object, has_speed() will return false, speed() will return the default value and type_case() will return TYPE_NOT_SET.
set_duration() void oneof:type float32 If any other oneof field in the same oneof is set, calls clear_type(). Sets the value of this field and sets the oneof case to kDuration.
duration() const oneof:type float32 void Returns the current value of the field if oneof case is kDuration. Otherwise, returns the default value.
clear_duration() void void Nothing will be changed if the oneof case is not kDuration. If the oneof case is kDuration, clears the value of the field and the oneof case

Parent topic: Base (C++)