::Message = boost::shared_ptr ::Message = boost::shared_ptr ::call(ros::SubscriptionCallbackHelperCallParams&) [with P = boost::shared_ptr ::deserialize(const ros::SubscriptionCallbackHelperDeserializeParams&) [with P = boost::shared_ptr
I have the following subscriber to read values from the /camera/odom topic using a zed camera (The `header.seq` is being used for testing purposes. It shall be changed to orientation values):
//#include
#include "ros/ros.h"
//#include "std_msgs/String.h"
#include "nav_msgs/Odometry.h"
//#include "geometry_msgs/Pose.h"
//#include "geometry_msgs/PoseWithCovariance.h"
//#include "geometry_msgs/Quaternion.h"
//using namespace std;
void odomCallback(nav_msgs::Odometry::ConstPtr& msg)
{
ROS_INFO("Orientation quaternions: x:[%d]", msg->header.seq);
}
int main(int argc, char **argv)
{
//cout << "Hello world!" << endl;
ros::init(argc, argv, "zed_ornt_subscriber_node");
ros::NodeHandle n;
ros::Subscriber sub = n.subscribe("/camera/odom",1000, odomCallback);
ros::spin();
return 0;
}
I have an error which is similar to what's shown [here](http://answers.ros.org/question/11540/error-when-subscribing-to-cameradepthpoints/) and [here](http://answers.ros.org/question/192707/subscribe-to-sensor_msgspointcloud/). But this is a `nav_msgs` type message that I am subscribing to, not `point cloud`. What library should be included to rectify this? My exact error message is as shown:
In file included from /opt/ros/indigo/include/ros/serialization.h:37:0,
from /opt/ros/indigo/include/ros/publisher.h:34,
from /opt/ros/indigo/include/ros/node_handle.h:32,
from /opt/ros/indigo/include/ros/ros.h:45,
from /home/xact/test_ws/src/zed_ornt_subscriber/src/zed_ornt_subscriber_node.cpp:2:
/opt/ros/indigo/include/ros/message_traits.h: In instantiation of 'static const char*
ros::message_traits::MD5Sum::value() [with M = boost::shared_ptr>>]':
/opt/ros/indigo/include/ros/message_traits.h:228:103: required from 'const char* ros::message_traits::md5sum() [with M = boost::shared_ptr>>]'
/opt/ros/indigo/include/ros/subscribe_options.h:89:50: required from 'void ros::SubscribeOptions::initByFullCallbackType(const string&, uint32_t, const boost::function&, const
boost::function::Message>()>&) [with P = boost::shared_ptr>>&; std::string = std::basic_string; uint32_t = unsigned int; typename ros::ParameterAdapter