Create node clock calls const (try 2) (#922)
* create node clock calls const Signed-off-by: stevemacenski <stevenmacenski@gmail.com> * two methods for get clock, one const Signed-off-by: stevemacenski <stevenmacenski@gmail.com> * changing APIs for NodeClock and NodeClockInterface Signed-off-by: stevemacenski <stevenmacenski@gmail.com> * changing RCLCPP_LIFECYCLE_PUBLIC from RCLCPP_PUBLIC for rclcpp lifecycle node get_clock const method Signed-off-by: stevemacenski <stevenmacenski@gmail.com>
This commit is contained in:
parent
6ba0f59fed
commit
9d5947108b
7 changed files with 43 additions and 5 deletions
|
@ -465,9 +465,13 @@ public:
|
|||
rclcpp::Clock::SharedPtr
|
||||
get_clock();
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
rclcpp::Clock::ConstSharedPtr
|
||||
get_clock() const;
|
||||
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
rclcpp::Time
|
||||
now();
|
||||
now() const;
|
||||
|
||||
/// Return the Node's internal NodeBaseInterface implementation.
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
|
|
|
@ -316,8 +316,14 @@ LifecycleNode::get_clock()
|
|||
return node_clock_->get_clock();
|
||||
}
|
||||
|
||||
rclcpp::Clock::ConstSharedPtr
|
||||
LifecycleNode::get_clock() const
|
||||
{
|
||||
return node_clock_->get_clock();
|
||||
}
|
||||
|
||||
rclcpp::Time
|
||||
LifecycleNode::now()
|
||||
LifecycleNode::now() const
|
||||
{
|
||||
return node_clock_->get_clock()->now();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue