3 #include <mvsim/mvsim-msgs/GenericObservation.pb.h> 4 #include <mvsim/mvsim-msgs/TimeStampedPose.pb.h> 6 #include <mrpt/obs/CObservation2DRangeScan.h> 14 std::cout <<
"topic callback: " << p.DebugString() << std::endl;
19 const std::vector<uint8_t>
data(
20 o.mrptserializedobservation().begin(),
21 o.mrptserializedobservation().end());
23 mrpt::serialization::CSerializable::Ptr
obj;
26 mrpt::obs::CObservation::Ptr
obs =
30 std::cout <<
"sensor callback: " << obs->getDescriptionAsTextValue()
34 int main(
int argc,
char** argv)
39 client.setVerbosityLevel(mrpt::system::LVL_DEBUG);
49 std::this_thread::sleep_for(std::chrono::seconds(5));
53 catch (
const std::exception& e)
55 std::cerr << mrpt::exception_to_str(e);
void BASE_IMPEXP OctetVectorToObject(const vector_byte &in_data, CSerializablePtr &obj)
void subscribeTopic(const std::string &topicName, const std::function< void(const MSG_T &)> &callback)
int main(int argc, char **argv)
void mySensorCallback(const mvsim_msgs::GenericObservation &o)
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
void myPoseCallback(const mvsim_msgs::TimeStampedPose &p)