38 #include <nav_msgs/Path.h>
39 #include <geometry_msgs/Twist.h>
46 std::string topic, publish_type;
47 nh.
param(
"global_plan_topic", topic, std::string(
"global_plan"));
48 nh.
param(
"global_plan_type", publish_type, std::string(
"Path3D"));
51 if (publish_type ==
"Path2D")
56 else if (publish_type ==
"")
62 if (publish_type !=
"Path3D")
64 ROS_ERROR_NAMED(
"Locomotor",
"Unknown global_plan_type \"%s\". Using Path3D instead.", publish_type.c_str());
75 nav_2d_msgs::Path2D to_publish = global_plan;
95 std::string topic, publish_type;
96 nh.
param(
"twist_topic", topic, std::string(
"cmd_vel"));
97 nh.
param(
"twist_type", publish_type, std::string(
"Twist3D"));
100 if (publish_type ==
"Twist2D")
105 else if (publish_type ==
"Twist2DStamped")
108 pub_ = global_nh.
advertise<nav_2d_msgs::Twist2DStamped>(topic, 1);
110 else if (publish_type ==
"")
116 if (publish_type !=
"Twist3D")
118 ROS_ERROR_NAMED(
"Locomotor",
"Unknown twist_type \"%s\". Using Twist3D instead.", publish_type.c_str());