19 #include <marker_msgs/MarkerDetection.h> 20 #include <mrpt/obs/CObservationBearingRange.h> 37 for (
size_t i = 0; i < src.markers.size(); i++)
39 const marker_msgs::Marker&
marker = src.markers[i];
42 measurment.
range = sqrt(
43 marker.pose.position.x * marker.pose.position.x +
44 marker.pose.position.y * marker.pose.position.y);
45 measurment.
yaw =
atan2(marker.pose.position.y, marker.pose.position.x);
46 measurment.
pitch = 0.0;
47 if (marker.ids.size() > 0)
68 for (
size_t i = 0; i < src.markers.size(); i++)
70 const marker_msgs::Marker&
marker = src.markers[i];
74 marker.pose.position.x * marker.pose.position.x +
75 marker.pose.position.y * marker.pose.position.y);
77 if (marker.ids.size() > 0)
std::deque< TMeasurement > sensedData
mrpt::system::TTimeStamp timestamp
mrpt::poses::CPoint3D sensorLocationOnRobot
Funtions to convert marker_msgs to mrpt msgs.
File includes methods for converting CNetworkOfPoses*DInf <=> NetworkOfPoses message types...
TMeasurementList sensedData
bool convert(const mrpt_msgs::ObservationRangeBeacon &_msg, const mrpt::poses::CPose3D &_pose, mrpt::obs::CObservationBeaconRanges &_obj)
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
mrpt::math::CArrayDouble< 3 > m_coords
mrpt::math::CArrayDouble< 3 > m_coords
T atan2(const T v0, const T v1)