sub = new ros::Subscriber(rosNodeHandle->subscribe(url.getPath(), 1000, &RosAphModule::subscriptionCallback, this));
that is not allowed, because ros::Message is an abstract type and the compiler says:
In file included from /usr/include/boost/function/function_base.hpp:32,
from /usr/include/boost/function/detail/prologue.hpp:17,
from /usr/include/boost/function.hpp:24,
from /opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/forwards.h:39,
from /opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/common.h:37,
from /opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/ros.h:43,
from /mnt/lisablack-home/calisi/devel/sf-software/OpenRDK-next/src/apps/ragent2/modules/aph/rosaphmodule/rosaphmodule.h:10,
from /mnt/lisablack-home/calisi/devel/sf-software/OpenRDK-next/src/apps/ragent2/modules/aph/rosaphmodule/rosaphmodule_aph.cpp:1:
/usr/include/boost/type_traits/alignment_of.hpp: In instantiation of ‘boost::detail::alignment_of_hack<ros::Message>’:
/usr/include/boost/type_traits/alignment_of.hpp:71: instantiated from ‘const size_t boost::detail::alignment_of_impl<ros::Message>::value’
/usr/include/boost/type_traits/alignment_of.hpp:89: instantiated from ‘boost::alignment_of<ros::Message>’
/usr/include/boost/smart_ptr/make_shared.hpp:41: instantiated from ‘boost::detail::sp_ms_deleter<ros::Message>’
/usr/include/boost/smart_ptr/make_shared.hpp:102: instantiated from ‘boost::shared_ptr<X> boost::make_shared() [with T = ros::Message]’
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/message_event.h:54: instantiated from ‘boost::shared_ptr<X> ros::DefaultMessageCreator<M>::operator()() [with M = ros::Message]’
/usr/include/boost/function/function_template.hpp:132: instantiated from ‘static R boost::detail::function::function_obj_invoker0<FunctionObj, R>::invoke(boost::detail::function::function_buffer&) [with FunctionObj = ros::DefaultMessageCreator<ros::Message>, R = boost::shared_ptr<ros::Message>]’
/usr/include/boost/function/function_template.hpp:913: instantiated from ‘void boost::function0<R>::assign_to(Functor) [with Functor = ros::DefaultMessageCreator<ros::Message>, R = boost::shared_ptr<ros::Message>]’
/usr/include/boost/function/function_template.hpp:722: instantiated from ‘boost::function0<R>::function0(Functor, typename boost::enable_if_c<boost::type_traits::ice_not::value, int>::type) [with Functor = ros::DefaultMessageCreator<ros::Message>, R = boost::shared_ptr<ros::Message>]’
/usr/include/boost/function/function_template.hpp:1064: instantiated from ‘boost::function<R()>::function(Functor, typename boost::enable_if_c<boost::type_traits::ice_not::value, int>::type) [with Functor = ros::DefaultMessageCreator<ros::Message>, R = boost::shared_ptr<ros::Message>]’
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/node_handle.h:391: instantiated from ‘ros::Subscriber ros::NodeHandle::subscribe(const std::string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&), T*, const ros::TransportHints&) [with M = ros::Message, T = RDK2::RAgent::RosAphModule]’
/mnt/lisablack-home/calisi/devel/sf-software/OpenRDK-next/src/apps/ragent2/modules/aph/rosaphmodule/rosaphmodule_aph.cpp:26: instantiated from here
/usr/include/boost/type_traits/alignment_of.hpp:42: error: cannot declare field ‘boost::detail::alignment_of_hack<ros::Message>::t’ to be of abstract type ‘ros::Message’
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/message.h:50: note: because the following virtual functions are pure within ‘ros::Message’:
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/message.h:60: note: virtual const std::string ros::Message::__getDataType() const
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/message.h:61: note: virtual const std::string ros::Message::__getMD5Sum() const
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/message.h:62: note: virtual const std::string ros::Message::__getMessageDefinition() const
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/message.h:66: note: virtual uint32_t ros::Message::serializationLength() const
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/message.h:67: note: virtual uint8_t* ros::Message::serialize(uint8_t*, uint32_t) const
/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/message.h:68: note: virtual uint8_t* ros::Message::deserialize(uint8_t*)