10 const std::string &topic_name)
22 visualization_msgs::MarkerArray>(
n_, topic_name, 1));
23 std::map<std::string, int> m;
32 const std::string &marker_name,
33 const std::string &ns,
45 << marker_name <<
" that is already on the marker array");
49 visualization_msgs::Marker new_marker;
50 new_marker.header.frame_id = frame_id;
56 new_marker.type = new_marker.SPHERE;
60 new_marker.type = new_marker.ARROW;
63 new_marker.action = new_marker.ADD;
64 new_marker.scale.x = 0.01;
65 new_marker.scale.y = 0.01;
66 new_marker.scale.z = 0.01;
68 new_marker.frame_locked =
false;
69 new_marker.color.r = 1.0;
70 new_marker.color.a = 1.0;
71 new_marker.pose.orientation.w = 1.0;
76 if (entry.second > max_id)
78 max_id = entry.second;
82 new_marker.id = max_id + 1;
84 marker_map_.at(group_key)[marker_name] = max_id + 1;
91 const std::string &marker_name,
double r,
112 const std::string &marker_name,
double x,
133 const std::string &marker_name,
134 const Eigen::Vector3d &initial_point,
135 const Eigen::Vector3d &final_point)
148 geometry_msgs::Point point;
151 marker_array_.at(group_key).markers[id].points.push_back(point);
153 marker_array_.at(group_key).markers[id].points.push_back(point);
158 const std::string &marker_name,
159 const Eigen::Affine3d &pose)
180 if (publisher.second->trylock())
183 publisher.second->unlockAndPublish();
189 const std::string &marker_name,
int &
id)
const 198 if (it.first == marker_name)
200 for (
unsigned long i = 0; i <
marker_array_.at(group_key).markers.size();
void poseEigenToMsg(const Eigen::Affine3d &e, geometry_msgs::Pose &m)
void pointEigenToMsg(const Eigen::Vector3d &e, geometry_msgs::Point &m)
#define ROS_ERROR_STREAM(args)