MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / createMarker

Function createMarker

tracking/apps/tracker_node.cpp:139–163  ·  view source on GitHub ↗

* \brief Create marker to be visualized in RViz * * \param[in] id The marker ID. * \param[in] frame_id The marker reference frame. * \param[in] position The marker position. * \param[in] color The marker color. */

Source from the content-addressed store, hash-verified

137 * \param[in] color The marker color.
138 */
139visualization_msgs::Marker
140createMarker (int id, std::string frame_id, ros::Time stamp, Eigen::Vector3d position, cv::Vec3f color)
141{
142 visualization_msgs::Marker marker;
143
144 marker.header.frame_id = world_frame_id;
145 marker.header.stamp = stamp;
146 marker.ns = frame_id;
147 marker.id = id;
148 marker.type = visualization_msgs::Marker::SPHERE;
149 marker.action = visualization_msgs::Marker::ADD;
150 marker.pose.position.x = position(0);
151 marker.pose.position.y = position(1);
152 marker.pose.position.z = position(2);
153 marker.scale.x = 0.1;
154 marker.scale.y = 0.1;
155 marker.scale.z = 0.1;
156 marker.color.r = color(0);
157 marker.color.g = color(1);
158 marker.color.b = color(2);
159 marker.color.a = 1.0;
160 marker.lifetime = ros::Duration(0.2);
161
162 return marker;
163}
164
165void
166plotCameraLegend (std::map<std::string, int> curr_color_map)

Callers 3

createMsgMethod · 0.70
detection_cbFunction · 0.70
createMsgMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected