Class Writer
Defined in File Writer.hpp
Inheritance Relationships
Base Type
public std::enable_shared_from_this< Writer >
Class Documentation
-
class Writer : public std::enable_shared_from_this<Writer>
The Writer class provides an API that allows a Node to create blockade Participants.
Public Types
-
using ReservedRange = rmf_traffic::blockade::ReservedRange
-
using ReservationId = rmf_traffic::blockade::ReservationId
-
using NewRangeCallback = std::function<void(const ReservationId reservation, const ReservedRange &range)>
Public Functions
-
rmf_traffic::blockade::Participant make_participant(rmf_traffic::blockade::ParticipantId id, double radius, NewRangeCallback new_range_cb)
Make a blockade participant.
- Parameters:
id – [in] The ID of the participant that is being created. This must match the schedule ParticipantId. All blockade participants must also be schedule participants to comply with the RMF traffic protocol.
radius – [in] The radius around the path that the participant will occupy.
new_range_cb – [in] This callback will get triggered when a new range arrives.
- Returns:
the API for updating the blockade Participant.
Public Static Functions
-
static std::shared_ptr<Writer> make(rclcpp::Node &node)
Create an instance of a writer. The writer and all Participants it creates depend on the life of the rclcpp::Node. It’s best to keep all of these as members of the Node.
- Parameters:
node – [in] The node that will manage the subscriptions of this writer.
-
using ReservedRange = rmf_traffic::blockade::ReservedRange