MRPT
1.9.9
|
Conversion between MRPT and ROS 1 types.
[New in MRPT 2.0.0]
This C++ library is part of MRPT and can be installed in Debian-based systems with:
sudo apt install libmrpt-ros1bridge-dev
See: Using MRPT from your CMake project
Classes | |
class | mrpt::ros1bridge::MapHdl |
Methods to convert between ROS msgs and MRPT objects for map datatypes. More... | |
Namespaces | |
mrpt::ros1bridge | |
ROS message: http://docs.ros.org/api/sensor_msgs/html/msg/NavSatFix.html MRPT message: https://github.com/MRPT/mrpt/blob/master/libs/obs/include/mrpt/obs/CObservationGPS.h. | |
Functions | |
bool | mrpt::ros1bridge::fromROS (const sensor_msgs::NavSatFix &msg, mrpt::obs::CObservationGPS &obj) |
Convert sensor_msgs/NavSatFix -> mrpt::obs::CObservationGPS. More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::obs::CObservationGPS &obj, const std_msgs::Header &msg_header, sensor_msgs::NavSatFix &msg) |
Convert mrpt::obs::CObservationGPS -> sensor_msgs/NavSatFix The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes. More... | |
mrpt::img::CImage | mrpt::ros1bridge::fromROS (const sensor_msgs::Image &i) |
Makes a deep copy of the image data. More... | |
sensor_msgs::Image | mrpt::ros1bridge::toROS (const mrpt::img::CImage &i, const std_msgs::Header &msg_header) |
Makes a deep copy of the image data. More... | |
bool | mrpt::ros1bridge::fromROS (const sensor_msgs::Imu &msg, mrpt::obs::CObservationIMU &obj) |
Convert sensor_msgs/Imu -> mrpt::obs::CObservationIMU // STILL NEED TO WRITE CODE FOR COVARIANCE. More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::obs::CObservationIMU &obj, const std_msgs::Header &msg_header, sensor_msgs::Imu &msg) |
Convert mrpt::obs::CObservationIMU -> sensor_msgs/Imu The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes. More... | |
bool | mrpt::ros1bridge::fromROS (const sensor_msgs::LaserScan &msg, const mrpt::poses::CPose3D &pose, mrpt::obs::CObservation2DRangeScan &obj) |
ROS->MRPT: Takes a sensor_msgs::LaserScan and the relative pose of the laser wrt base_link and builds a CObservation2DRangeScan. More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::obs::CObservation2DRangeScan &obj, sensor_msgs::LaserScan &msg) |
MRPT->ROS: Takes a CObservation2DRangeScan and outputs range data in sensor_msgs::LaserScan. More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::obs::CObservation2DRangeScan &obj, sensor_msgs::LaserScan &msg, geometry_msgs::Pose &pose) |
MRPT->ROS: Takes a CObservation2DRangeScan and outputs range data in sensor_msgs::LaserScan + the relative pose of the laser wrt base_link. More... | |
tf2::Matrix3x3 | mrpt::ros1bridge::toROS (const mrpt::math::CMatrixDouble33 &src) |
tf2::Transform | mrpt::ros1bridge::toROS_tfTransform (const mrpt::poses::CPose2D &src) |
geometry_msgs::Pose | mrpt::ros1bridge::toROS_Pose (const mrpt::poses::CPose2D &src) |
tf2::Transform | mrpt::ros1bridge::toROS_tfTransform (const mrpt::math::TPose2D &src) |
geometry_msgs::Pose | mrpt::ros1bridge::toROS_Pose (const mrpt::math::TPose2D &src) |
tf2::Transform | mrpt::ros1bridge::toROS_tfTransform (const mrpt::poses::CPose3D &src) |
geometry_msgs::Pose | mrpt::ros1bridge::toROS_Pose (const mrpt::poses::CPose3D &src) |
tf2::Transform | mrpt::ros1bridge::toROS_tfTransform (const mrpt::math::TPose3D &src) |
geometry_msgs::Pose | mrpt::ros1bridge::toROS_Pose (const mrpt::math::TPose3D &src) |
geometry_msgs::PoseWithCovariance | mrpt::ros1bridge::toROS_Pose (const mrpt::poses::CPose3DPDFGaussian &src) |
geometry_msgs::PoseWithCovariance | mrpt::ros1bridge::toROS (const mrpt::poses::CPose3DPDFGaussianInf &src) |
geometry_msgs::PoseWithCovariance | mrpt::ros1bridge::toROS (const mrpt::poses::CPosePDFGaussian &src) |
geometry_msgs::PoseWithCovariance | mrpt::ros1bridge::toROS (const mrpt::poses::CPosePDFGaussianInf &src) |
geometry_msgs::Quaternion | mrpt::ros1bridge::toROS (const mrpt::math::CQuaternionDouble &src) |
mrpt::poses::CPose3D | mrpt::ros1bridge::fromROS (const tf2::Transform &src) |
mrpt::math::CMatrixDouble33 | mrpt::ros1bridge::fromROS (const tf2::Matrix3x3 &src) |
mrpt::poses::CPose3D | mrpt::ros1bridge::fromROS (const geometry_msgs::Pose &src) |
mrpt::poses::CPose3DPDFGaussian | mrpt::ros1bridge::fromROS (const geometry_msgs::PoseWithCovariance &src) |
mrpt::math::CQuaternionDouble | mrpt::ros1bridge::fromROS (const geometry_msgs::Quaternion &src) |
bool | mrpt::ros1bridge::fromROS (const sensor_msgs::Range &msg, mrpt::obs::CObservationRange &obj) |
Convert sensor_msgs/Range -> mrpt::obs::CObservationRange. More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::obs::CObservationRange &obj, const std_msgs::Header &msg_header, sensor_msgs::Range *msg) |
Convert mrpt::obs::CObservationRange -> sensor_msgs/Range The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes. More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::obs::CObservationStereoImages &obj, const std_msgs::Header &msg_header, sensor_msgs::Image &left, sensor_msgs::Image &right, stereo_msgs::DisparityImage &disparity) |
mrpt::system::TTimeStamp | mrpt::ros1bridge::fromROS (const ros::Time &src) |
converts ros time to mrpt time More... | |
ros::Time | mrpt::ros1bridge::toROS (const mrpt::system::TTimeStamp &src) |
converts mrpt time to ros time More... | |
Maps, Occupancy Grid Maps: ROS <-> MRPT | |
bool | mrpt::ros1bridge::fromROS (const nav_msgs::OccupancyGrid &src, mrpt::maps::COccupancyGridMap2D &des) |
converts ros msg to mrpt object More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::maps::COccupancyGridMap2D &src, nav_msgs::OccupancyGrid &msg, const std_msgs::Header &header) |
converts mrpt object to ros msg and updates the msg header More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::maps::COccupancyGridMap2D &src, nav_msgs::OccupancyGrid &msg) |
converts mrpt object to ros msg More... | |
Point clouds: ROS <-> MRPT | |
bool | mrpt::ros1bridge::fromROS (const sensor_msgs::PointCloud &msg, mrpt::maps::CSimplePointsMap &obj) |
Convert sensor_msgs/PointCloud -> mrpt::maps::CSimplePointsMap CSimplePointsMap only contains (x,y,z) data, so sensor_msgs::PointCloud::channels are ignored. More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::maps::CSimplePointsMap &obj, const std_msgs::Header &msg_header, sensor_msgs::PointCloud &msg) |
Convert mrpt::maps::CSimplePointsMap -> sensor_msgs/PointCloud The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes. More... | |
sensor_msgs::PointCloud2: ROS <-> MRPT | |
bool | mrpt::ros1bridge::fromROS (const sensor_msgs::PointCloud2 &msg, mrpt::maps::CSimplePointsMap &obj) |
Convert sensor_msgs/PointCloud2 -> mrpt::slam::CSimplePointsMap Only (x,y,z) data is converted. More... | |
bool | mrpt::ros1bridge::fromROS (const sensor_msgs::PointCloud2 &msg, mrpt::maps::CPointsMapXYZI &obj) |
bool | mrpt::ros1bridge::fromROS (const sensor_msgs::PointCloud2 &m, mrpt::obs::CObservationRotatingScan &o, const mrpt::poses::CPose3D &sensorPoseOnRobot, unsigned int num_azimuth_divisions=360) |
Convert sensor_msgs/PointCloud2 -> mrpt::obs::CObservationRotatingScan. More... | |
std::set< std::string > | mrpt::ros1bridge::extractFields (const sensor_msgs::PointCloud2 &msg) |
Extract a list of fields found in the point cloud. More... | |
bool | mrpt::ros1bridge::toROS (const mrpt::maps::CSimplePointsMap &obj, const std_msgs::Header &msg_header, sensor_msgs::PointCloud2 &msg) |
Convert mrpt::slam::CSimplePointsMap -> sensor_msgs/PointCloud2 The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes. More... | |
std::set< std::string > mrpt::ros1bridge::extractFields | ( | const sensor_msgs::PointCloud2 & | msg | ) |
Extract a list of fields found in the point cloud.
Typically: {"x","y","z","intensity"}
Definition at line 73 of file point_cloud2.cpp.
mrpt::system::TTimeStamp mrpt::ros1bridge::fromROS | ( | const ros::Time & | src | ) |
converts ros time to mrpt time
src | ros time |
des | mrpt time |
Definition at line 16 of file time.cpp.
References mrpt::system::time_tToTimestamp().
mrpt::img::CImage mrpt::ros1bridge::fromROS | ( | const sensor_msgs::Image & | i | ) |
Makes a deep copy of the image data.
Definition at line 29 of file image.cpp.
References mrpt::img::DEEP_COPY.
bool mrpt::ros1bridge::fromROS | ( | const sensor_msgs::LaserScan & | msg, |
const mrpt::poses::CPose3D & | pose, | ||
mrpt::obs::CObservation2DRangeScan & | obj | ||
) |
ROS->MRPT: Takes a sensor_msgs::LaserScan and the relative pose of the laser wrt base_link and builds a CObservation2DRangeScan.
bool mrpt::ros1bridge::fromROS | ( | const sensor_msgs::PointCloud & | msg, |
mrpt::maps::CSimplePointsMap & | obj | ||
) |
Convert sensor_msgs/PointCloud -> mrpt::maps::CSimplePointsMap CSimplePointsMap only contains (x,y,z) data, so sensor_msgs::PointCloud::channels are ignored.
Definition at line 17 of file point_cloud.cpp.
References mrpt::maps::CMetricMap::clear(), mrpt::maps::CPointsMap::insertPoint(), and mrpt::maps::CSimplePointsMap::reserve().
bool mrpt::ros1bridge::fromROS | ( | const sensor_msgs::Range & | msg, |
mrpt::obs::CObservationRange & | obj | ||
) |
Convert sensor_msgs/Range -> mrpt::obs::CObservationRange.
again this is amibiguous as can't be certain of number of measurement from corresponding ROS message
again this is amibiguous as can't be certain of number of measurement from corresponding ROS message
Definition at line 20 of file range.cpp.
References mrpt::obs::CObservationRange::maxSensorDistance, mrpt::obs::CObservationRange::minSensorDistance, mrpt::obs::CObservationRange::sensedData, and mrpt::obs::CObservationRange::sensorConeApperture.
bool mrpt::ros1bridge::fromROS | ( | const sensor_msgs::PointCloud2 & | msg, |
mrpt::maps::CSimplePointsMap & | obj | ||
) |
Convert sensor_msgs/PointCloud2 -> mrpt::slam::CSimplePointsMap Only (x,y,z) data is converted.
Convert sensor_msgs/PointCloud2 -> mrpt::slam::CSimplePointsMap.
To use the intensity channel, see the alternative signature for CPointsMapXYZI. Requires point cloud fields: x,y,z.
Definition at line 84 of file point_cloud2.cpp.
References mrpt::ros1bridge::check_field(), mrpt::maps::CMetricMap::clear(), mrpt::ros1bridge::get_float_from_field(), mrpt::maps::CPointsMap::insertPoint(), and mrpt::maps::CSimplePointsMap::reserve().
bool mrpt::ros1bridge::fromROS | ( | const sensor_msgs::Imu & | msg, |
mrpt::obs::CObservationIMU & | obj | ||
) |
Convert sensor_msgs/Imu -> mrpt::obs::CObservationIMU // STILL NEED TO WRITE CODE FOR COVARIANCE.
Definition at line 20 of file imu.cpp.
References mrpt::obs::IMU_ORI_QUAT_W, mrpt::obs::IMU_ORI_QUAT_X, mrpt::obs::IMU_ORI_QUAT_Y, mrpt::obs::IMU_ORI_QUAT_Z, mrpt::obs::IMU_WX, mrpt::obs::IMU_WY, mrpt::obs::IMU_WZ, mrpt::obs::IMU_X_ACC, mrpt::obs::IMU_Y_ACC, mrpt::obs::IMU_Z_ACC, and mrpt::obs::CObservationIMU::set().
bool mrpt::ros1bridge::fromROS | ( | const sensor_msgs::NavSatFix & | msg, |
mrpt::obs::CObservationGPS & | obj | ||
) |
Convert sensor_msgs/NavSatFix -> mrpt::obs::CObservationGPS.
Definition at line 20 of file gps.cpp.
References mrpt::obs::gnss::Message_NMEA_GGA::content_t::altitude_meters, mrpt::obs::gnss::Message_NMEA_GGA::fields, mrpt::obs::gnss::Message_NMEA_GGA::content_t::fix_quality, mrpt::obs::gnss::Message_NMEA_GGA::content_t::latitude_degrees, mrpt::obs::gnss::Message_NMEA_GGA::content_t::longitude_degrees, and mrpt::obs::CObservationGPS::setMsg().
Referenced by check_CPose3D_tofrom_ROS(), mrpt::ros1bridge::convert(), mrpt::ros1bridge::fromROS(), and TEST().
bool mrpt::ros1bridge::fromROS | ( | const sensor_msgs::PointCloud2 & | msg, |
mrpt::maps::CPointsMapXYZI & | obj | ||
) |
Definition at line 123 of file point_cloud2.cpp.
References mrpt::ros1bridge::check_field(), mrpt::maps::CMetricMap::clear(), mrpt::ros1bridge::get_float_from_field(), mrpt::maps::CPointsMap::insertPoint(), mrpt::maps::CPointsMapXYZI::reserve(), mrpt::maps::CPointsMapXYZI::setPointIntensity(), and mrpt::maps::CPointsMap::size().
bool mrpt::ros1bridge::fromROS | ( | const sensor_msgs::PointCloud2 & | m, |
mrpt::obs::CObservationRotatingScan & | o, | ||
const mrpt::poses::CPose3D & | sensorPoseOnRobot, | ||
unsigned int | num_azimuth_divisions = 360 |
||
) |
Convert sensor_msgs/PointCloud2 -> mrpt::obs::CObservationRotatingScan.
Requires point cloud fields: x,y,z,intensity,ring
Definition at line 182 of file point_cloud2.cpp.
References ASSERT_ABOVEEQ_, ASSERT_BELOWEQ_, ASSERT_NOT_EQUAL_, mrpt::obs::gnss::azimuth, mrpt::ros1bridge::check_field(), mrpt::obs::CObservationRotatingScan::columnCount, mrpt::math::MatrixVectorBase< Scalar, Derived >::fill(), mrpt::ros1bridge::fromROS(), mrpt::ros1bridge::get_float_from_field(), mrpt::ros1bridge::get_uint16_from_field(), mrpt::obs::CObservationRotatingScan::intensityImage, mrpt::poses::CPose3D::inverseComposePoint(), mrpt::keep_max(), mrpt::keep_min(), M_PI, mrpt::math::TPoint3D_< T >::norm(), mrpt::obs::CObservationRotatingScan::rangeImage, mrpt::obs::CObservationRotatingScan::rangeResolution, mrpt::math::CMatrixDynamic< T >::resize(), mrpt::obs::CObservationRotatingScan::rowCount, mrpt::obs::CObservation::timestamp, mrpt::math::TPoint3D_data< T >::x, and mrpt::math::TPoint3D_data< T >::y.
mrpt::poses::CPose3D mrpt::ros1bridge::fromROS | ( | const tf2::Transform & | src | ) |
Definition at line 221 of file pose.cpp.
References mrpt::ros1bridge::fromROS(), mrpt::poses::CPose3D::setRotationMatrix(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), and mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::y().
mrpt::math::CMatrixDouble33 mrpt::ros1bridge::fromROS | ( | const tf2::Matrix3x3 & | src | ) |
mrpt::poses::CPose3D mrpt::ros1bridge::fromROS | ( | const geometry_msgs::Pose & | src | ) |
Definition at line 239 of file pose.cpp.
References mrpt::math::CQuaternion< T >::x().
mrpt::poses::CPose3DPDFGaussian mrpt::ros1bridge::fromROS | ( | const geometry_msgs::PoseWithCovariance & | src | ) |
Definition at line 248 of file pose.cpp.
References mrpt::poses::CPose3DPDFGaussian::cov, mrpt::ros1bridge::fromROS(), and mrpt::poses::CPose3DPDFGaussian::mean.
mrpt::math::CQuaternionDouble mrpt::ros1bridge::fromROS | ( | const geometry_msgs::Quaternion & | src | ) |
Definition at line 264 of file pose.cpp.
References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().
bool mrpt::ros1bridge::fromROS | ( | const nav_msgs::OccupancyGrid & | src, |
mrpt::maps::COccupancyGridMap2D & | des | ||
) |
converts ros msg to mrpt object
src | |
des |
Definition at line 84 of file map.cpp.
References mrpt::maps::COccupancyGridMap2D::getRow(), MRPT_END, MRPT_START, and mrpt::maps::COccupancyGridMap2D::setSize().
bool mrpt::ros1bridge::toROS | ( | const mrpt::obs::CObservationStereoImages & | obj, |
const std_msgs::Header & | msg_header, | ||
sensor_msgs::Image & | left, | ||
sensor_msgs::Image & | right, | ||
stereo_msgs::DisparityImage & | disparity | ||
) |
Definition at line 29 of file stereo_image.cpp.
References mrpt::img::CImage::asCvMatRef(), mrpt::img::CImage::getHeight(), mrpt::img::CImage::getWidth(), mrpt::obs::CObservationStereoImages::hasImageDisparity, mrpt::obs::CObservationStereoImages::imageDisparity, mrpt::obs::CObservationStereoImages::imageLeft, and mrpt::obs::CObservationStereoImages::imageRight.
tf2::Matrix3x3 mrpt::ros1bridge::toROS | ( | const mrpt::math::CMatrixDouble33 & | src | ) |
ros::Time mrpt::ros1bridge::toROS | ( | const mrpt::system::TTimeStamp & | src | ) |
converts mrpt time to ros time
src | ros time |
des | mrpt time |
Definition at line 30 of file time.cpp.
References mrpt::system::timestampTotime_t().
sensor_msgs::Image mrpt::ros1bridge::toROS | ( | const mrpt::img::CImage & | i, |
const std_msgs::Header & | msg_header | ||
) |
Makes a deep copy of the image data.
Definition at line 35 of file image.cpp.
References mrpt::img::CImage::asCvMatRef(), mrpt::img::CImage::getHeight(), and mrpt::img::CImage::getWidth().
bool mrpt::ros1bridge::toROS | ( | const mrpt::obs::CObservation2DRangeScan & | obj, |
sensor_msgs::LaserScan & | msg | ||
) |
MRPT->ROS: Takes a CObservation2DRangeScan and outputs range data in sensor_msgs::LaserScan.
Definition at line 63 of file laser_scan.cpp.
References mrpt::obs::CObservation2DRangeScan::aperture, mrpt::obs::CObservation2DRangeScan::getScanRange(), mrpt::obs::CObservation2DRangeScan::getScanSize(), mrpt::obs::CObservation2DRangeScan::maxRange, mrpt::obs::CObservation::sensorLabel, mrpt::obs::CObservation::timestamp, and mrpt::ros1bridge::toROS().
bool mrpt::ros1bridge::toROS | ( | const mrpt::maps::CSimplePointsMap & | obj, |
const std_msgs::Header & | msg_header, | ||
sensor_msgs::PointCloud & | msg | ||
) |
Convert mrpt::maps::CSimplePointsMap -> sensor_msgs/PointCloud The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes.
Since CSimplePointsMap only contains (x,y,z) data, sensor_msgs::PointCloud::channels will be empty.
Definition at line 29 of file point_cloud.cpp.
References mrpt::maps::CPointsMap::getPoint(), and mrpt::maps::CPointsMap::size().
bool mrpt::ros1bridge::toROS | ( | const mrpt::obs::CObservationRange & | obj, |
const std_msgs::Header & | msg_header, | ||
sensor_msgs::Range * | msg | ||
) |
Convert mrpt::obs::CObservationRange -> sensor_msgs/Range The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes.
Since COnservation does not contain "radiation_type", sensor_msgs::Range::radiation_type will be empty.
following part needs to be double checked, it looks incorrect ROS has single number float for range, MRPT has a list of sensedDistances
currently the following are not available in MRPT for corresponding range ROS message NO corresponding value for MRPT radiation_type at http://mrpt.ual.es/reference/devel/_c_observation_range_8h_source.html
following part needs to be double checked, it looks incorrect ROS has single number float for range, MRPT has a list of sensedDistances
currently the following are not available in MRPT for corresponding range ROS message NO corresponding value for MRPT radiation_type at http://mrpt.ual.es/reference/devel/_c_observation_range_8h_source.html
Definition at line 32 of file range.cpp.
References mrpt::obs::gnss::header, mrpt::obs::CObservationRange::maxSensorDistance, mrpt::obs::CObservationRange::minSensorDistance, mrpt::obs::CObservationRange::sensedData, and mrpt::obs::CObservationRange::sensorConeApperture.
geometry_msgs::PoseWithCovariance mrpt::ros1bridge::toROS | ( | const mrpt::poses::CPose3DPDFGaussianInf & | src | ) |
Definition at line 154 of file pose.cpp.
References mrpt::poses::CPose3DPDFGaussian::copyFrom(), and mrpt::ros1bridge::toROS_Pose().
bool mrpt::ros1bridge::toROS | ( | const mrpt::obs::CObservationIMU & | obj, |
const std_msgs::Header & | msg_header, | ||
sensor_msgs::Imu & | msg | ||
) |
Convert mrpt::obs::CObservationIMU -> sensor_msgs/Imu The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes.
Since COnservationIMU does not contain covariance terms NEED TO fix those.
computing acceleration in global navigation frame not in local vehicle frame, might be the other way round
computing acceleration in global navigation frame not in local vehicle frame, might be the other way round
Definition at line 41 of file imu.cpp.
References mrpt::obs::IMU_ORI_QUAT_W, mrpt::obs::IMU_ORI_QUAT_X, mrpt::obs::IMU_ORI_QUAT_Y, mrpt::obs::IMU_ORI_QUAT_Z, mrpt::obs::IMU_WX, mrpt::obs::IMU_WY, mrpt::obs::IMU_WZ, mrpt::obs::IMU_X_ACC, mrpt::obs::IMU_Y_ACC, mrpt::obs::IMU_Z_ACC, and mrpt::obs::CObservationIMU::rawMeasurements.
bool mrpt::ros1bridge::toROS | ( | const mrpt::obs::CObservation2DRangeScan & | obj, |
sensor_msgs::LaserScan & | msg, | ||
geometry_msgs::Pose & | pose | ||
) |
MRPT->ROS: Takes a CObservation2DRangeScan and outputs range data in sensor_msgs::LaserScan + the relative pose of the laser wrt base_link.
Definition at line 90 of file laser_scan.cpp.
References mrpt::obs::CObservation2DRangeScan::sensorPose, mrpt::ros1bridge::toROS(), and mrpt::ros1bridge::toROS_Pose().
bool mrpt::ros1bridge::toROS | ( | const mrpt::obs::CObservationGPS & | obj, |
const std_msgs::Header & | msg_header, | ||
sensor_msgs::NavSatFix & | msg | ||
) |
Convert mrpt::obs::CObservationGPS -> sensor_msgs/NavSatFix The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes.
Since COnservationGPS does not contain "position_covariance" and "position_covariance_type" sensor_msgs::NavSatFix::position_covariance_type and sensor_msgs::NavSatFix::position_covariance will be empty.
following parameter assigned as per http://mrpt.ual.es/reference/devel/structmrpt_1_1obs_1_1gnss_1_1_message___n_m_e_a___g_g_a_1_1content__t.html#a33415dc947663d43015605c41b0f66cb http://mrpt.ual.es/reference/devel/gnss__messages__ascii__nmea_8h_source.html
position_covariance is not available in mrpt position_covariance type is not available in mrpt
following parameter assigned as per http://mrpt.ual.es/reference/devel/structmrpt_1_1obs_1_1gnss_1_1_message___n_m_e_a___g_g_a_1_1content__t.html#a33415dc947663d43015605c41b0f66cb http://mrpt.ual.es/reference/devel/gnss__messages__ascii__nmea_8h_source.html
position_covariance is not available in mrpt position_covariance type is not available in mrpt
Definition at line 48 of file gps.cpp.
References mrpt::obs::gnss::Message_NMEA_GGA::content_t::altitude_meters, mrpt::obs::gnss::Message_NMEA_GGA::fields, mrpt::obs::gnss::Message_NMEA_GGA::content_t::fix_quality, mrpt::obs::CObservationGPS::getMsgByClass(), mrpt::obs::CObservationGPS::hasMsgClass(), mrpt::obs::gnss::Message_NMEA_GGA::content_t::latitude_degrees, and mrpt::obs::gnss::Message_NMEA_GGA::content_t::longitude_degrees.
Referenced by TEST(), mrpt::ros1bridge::toROS(), and mrpt::ros1bridge::toROS_tfTransform().
geometry_msgs::PoseWithCovariance mrpt::ros1bridge::toROS | ( | const mrpt::poses::CPosePDFGaussian & | src | ) |
Definition at line 162 of file pose.cpp.
References mrpt::poses::CPosePDFGaussian::cov, mrpt::poses::CPosePDFGaussian::mean, and mrpt::ros1bridge::toROS_Pose().
geometry_msgs::PoseWithCovariance mrpt::ros1bridge::toROS | ( | const mrpt::poses::CPosePDFGaussianInf & | src | ) |
Definition at line 197 of file pose.cpp.
References mrpt::poses::CPosePDFGaussian::copyFrom(), and mrpt::ros1bridge::toROS().
geometry_msgs::Quaternion mrpt::ros1bridge::toROS | ( | const mrpt::math::CQuaternionDouble & | src | ) |
Definition at line 206 of file pose.cpp.
References mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::math::CQuaternion< T >::y(), and mrpt::math::CQuaternion< T >::z().
bool mrpt::ros1bridge::toROS | ( | const mrpt::maps::CSimplePointsMap & | obj, |
const std_msgs::Header & | msg_header, | ||
sensor_msgs::PointCloud2 & | msg | ||
) |
Convert mrpt::slam::CSimplePointsMap -> sensor_msgs/PointCloud2 The user must supply the "msg_header" field to be copied into the output message object, since that part does not appear in MRPT classes.
Since CSimplePointsMap only contains (x,y,z) data, sensor_msgs::PointCloud2::channels will be empty.
Since CSimplePointsMap only contains (x,y,z) data, sensor_msgs::PointCloud2::channels will be empty.
Definition at line 174 of file point_cloud2.cpp.
bool mrpt::ros1bridge::toROS | ( | const mrpt::maps::COccupancyGridMap2D & | src, |
nav_msgs::OccupancyGrid & | msg, | ||
const std_msgs::Header & | header | ||
) |
converts mrpt object to ros msg and updates the msg header
src | |
header |
Definition at line 112 of file map.cpp.
References mrpt::obs::gnss::header, and mrpt::ros1bridge::toROS().
bool mrpt::ros1bridge::toROS | ( | const mrpt::maps::COccupancyGridMap2D & | src, |
nav_msgs::OccupancyGrid & | msg | ||
) |
converts mrpt object to ros msg
Definition at line 120 of file map.cpp.
References mrpt::maps::COccupancyGridMap2D::getResolution(), mrpt::maps::COccupancyGridMap2D::getRow(), mrpt::maps::COccupancyGridMap2D::getSizeX(), mrpt::maps::COccupancyGridMap2D::getSizeY(), mrpt::maps::COccupancyGridMap2D::getXMin(), and mrpt::maps::COccupancyGridMap2D::getYMin().
geometry_msgs::Pose mrpt::ros1bridge::toROS_Pose | ( | const mrpt::poses::CPose2D & | src | ) |
Definition at line 54 of file pose.cpp.
Referenced by check_CPose3D_tofrom_ROS(), TEST(), mrpt::ros1bridge::toROS(), and mrpt::ros1bridge::toROS_Pose().
geometry_msgs::Pose mrpt::ros1bridge::toROS_Pose | ( | const mrpt::math::TPose2D & | src | ) |
Definition at line 64 of file pose.cpp.
References mrpt::math::TPose2D::phi, mrpt::math::TPose2D::x, and mrpt::math::TPose2D::y.
geometry_msgs::Pose mrpt::ros1bridge::toROS_Pose | ( | const mrpt::poses::CPose3D & | src | ) |
Definition at line 101 of file pose.cpp.
References mrpt::poses::CPose3D::getAsQuaternion(), mrpt::math::CQuaternion< T >::r(), mrpt::math::CQuaternion< T >::x(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), mrpt::math::CQuaternion< T >::y(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::y(), and mrpt::math::CQuaternion< T >::z().
geometry_msgs::Pose mrpt::ros1bridge::toROS_Pose | ( | const mrpt::math::TPose3D & | src | ) |
Definition at line 124 of file pose.cpp.
References mrpt::ros1bridge::toROS_Pose().
geometry_msgs::PoseWithCovariance mrpt::ros1bridge::toROS_Pose | ( | const mrpt::poses::CPose3DPDFGaussian & | src | ) |
Definition at line 129 of file pose.cpp.
References mrpt::poses::CPose3DPDFGaussian::cov, mrpt::poses::CPose3DPDFGaussian::mean, and mrpt::ros1bridge::toROS_Pose().
tf2::Transform mrpt::ros1bridge::toROS_tfTransform | ( | const mrpt::poses::CPose2D & | src | ) |
Definition at line 49 of file pose.cpp.
Referenced by mrpt::ros1bridge::toROS_tfTransform().
tf2::Transform mrpt::ros1bridge::toROS_tfTransform | ( | const mrpt::math::TPose2D & | src | ) |
Definition at line 59 of file pose.cpp.
References mrpt::ros1bridge::toROS_tfTransform().
tf2::Transform mrpt::ros1bridge::toROS_tfTransform | ( | const mrpt::poses::CPose3D & | src | ) |
Definition at line 93 of file pose.cpp.
References mrpt::poses::CPose3D::getRotationMatrix(), mrpt::ros1bridge::toROS(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::x(), and mrpt::poses::CPoseOrPoint< DERIVEDCLASS, DIM >::y().
tf2::Transform mrpt::ros1bridge::toROS_tfTransform | ( | const mrpt::math::TPose3D & | src | ) |
Definition at line 119 of file pose.cpp.
References mrpt::ros1bridge::toROS_tfTransform().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020 |