rclcpp  master
C++ ROS Client Library API
rclcpp.hpp
Go to the documentation of this file.
1 // Copyright 2014 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
122 #ifndef RCLCPP__RCLCPP_HPP_
123 #define RCLCPP__RCLCPP_HPP_
124 
125 #include <csignal>
126 #include <memory>
127 
128 #include "rclcpp/executors.hpp"
129 #include "rclcpp/node.hpp"
130 #include "rclcpp/parameter.hpp"
133 #include "rclcpp/rate.hpp"
134 #include "rclcpp/time.hpp"
135 #include "rclcpp/utilities.hpp"
137 
138 namespace rclcpp
139 {
140 
141 // Namespace escalations.
142 // For example, this next line escalates type "rclcpp:node::Node" to "rclcpp::Node"
143 using rclcpp::node::Node;
152 using ContextSharedPtr = rclcpp::context::Context::SharedPtr;
157 
158 } // namespace rclcpp
159 
160 #endif // RCLCPP__RCLCPP_HPP_
bool ok()
Check rclcpp&#39;s status.
Subscription implementation, templated on the type of message this subscription receives.
Definition: subscription.hpp:124
Definition: timer.hpp:43
void init(int argc, char *argv[])
Initialize communications via the rmw implementation and set up a global signal handler.
Definition: allocator_common.hpp:24
Definition: rate.hpp:46
rclcpp::context::Context::SharedPtr ContextSharedPtr
Definition: rclcpp.hpp:152
Node is the single point of entry for creating publishers and subscribers.
Definition: node.hpp:62
Definition: subscription.hpp:53
bool sleep_for(const std::chrono::nanoseconds &nanoseconds)
Use the global condition variable to block for the specified amount of time.
GenericRate< std::chrono::steady_clock > WallRate
Definition: rate.hpp:117
Generic timer templated on the clock type. Periodically executes a user-specified callback...
Definition: timer.hpp:107
GenericTimer< CallbackType, std::chrono::steady_clock > WallTimer
Definition: timer.hpp:183
void shutdown()
Notify the signal handler and rmw that rclcpp is shutting down.
A publisher publishes messages of any type to a topic.
Definition: publisher.hpp:146