41 #include <rclcpp/executors/multi_threaded_executor.hpp>
42 #include <rclcpp/logger.hpp>
43 #include <rclcpp/logging.hpp>
44 #include <rclcpp/node.hpp>
45 #include <rclcpp/utilities.hpp>
47 static const std::string ROBOT_DESCRIPTION =
"robot_description";
48 static const rclcpp::Logger
LOGGER = rclcpp::get_logger(
"print_planning_scene_info");
50 int main(
int argc,
char** argv)
52 rclcpp::init(argc, argv);
54 auto node = rclcpp::Node::make_shared(
"print_scene_info_to_console");
56 rclcpp::executors::MultiThreadedExecutor executor;
57 executor.add_node(node);
59 RCLCPP_INFO_STREAM(LOGGER,
"Getting planning scene info to print");
65 RCLCPP_ERROR_STREAM(LOGGER,
"Planning scene not configured");
PlanningSceneMonitor Subscribes to the topic planning_scene.
const planning_scene::PlanningScenePtr & getPlanningScene()
Avoid this function! Returns an unsafe pointer to the current planning scene.
static const std::string DEFAULT_PLANNING_SCENE_SERVICE
The name of the service used by default for requesting full planning scene state.
bool requestPlanningSceneState(const std::string &service_name=DEFAULT_PLANNING_SCENE_SERVICE)
Request a full planning scene state using a service call Be careful not to use this in conjunction wi...
const rclcpp::Logger LOGGER
int main(int argc, char **argv)