Package Details: ros-indigo-rosserial-server 0.6.4-1

Git Clone URL: https://aur.archlinux.org/ros-indigo-rosserial-server.git (read-only)
Package Base: ros-indigo-rosserial-server
Description: ROS - The rosserial_server package provides a C++ implementation of the rosserial server side, serving as a more performance- and stability-oriented alternative to rosserial_python.
Upstream URL: http://www.ros.org/
Licenses: BSD
Submitter: candronikos
Maintainer: candronikos
Last Packager: candronikos
Votes: 0
Popularity: 0.000000
First Submitted: 2015-12-19 02:26
Last Updated: 2016-04-23 03:18

Latest Comments

jerry73204 commented on 2018-11-03 19:05

The source cannot compile due to erroneous boost function usage. Please include this patch to fix it.

diff --git a/include/rosserial_server/session.h b/include/rosserial_server/session.h
index e91e80b1..8ed3d752 100644
--- a/include/rosserial_server/session.h
+++ b/include/rosserial_server/session.h
@@ -474,7 +474,7 @@ private:
   boost::asio::deadline_timer sync_timer_;
   boost::asio::deadline_timer require_check_timer_;

-  std::map< uint16_t, boost::function<void(ros::serialization::IStream)> > callbacks_;
+  std::map< uint16_t, boost::function<void(ros::serialization::IStream&)> > callbacks_;
   std::map<uint16_t, PublisherPtr> publishers_;
   std::map<uint16_t, SubscriberPtr> subscribers_;
   std::map<std::string, ServiceClientPtr> services_;
diff --git a/include/rosserial_server/topic_handlers.h b/include/rosserial_server/topic_handlers.h
index 666f3fc2..2f367c34 100644
--- a/include/rosserial_server/topic_handlers.h
+++ b/include/rosserial_server/topic_handlers.h
@@ -93,7 +93,7 @@ typedef boost::shared_ptr<Publisher> PublisherPtr;
 class Subscriber {
 public:
   Subscriber(ros::NodeHandle& nh, rosserial_msgs::TopicInfo& topic_info,
-      boost::function<void(std::vector<uint8_t> buffer)> write_fn)
+      boost::function<void(std::vector<uint8_t>& buffer)> write_fn)
     : write_fn_(write_fn) {
     ros::SubscribeOptions opts;
     opts.init<topic_tools::ShapeShifter>(
@@ -119,7 +119,7 @@ private:
   }

   ros::Subscriber subscriber_;
-  boost::function<void(std::vector<uint8_t> buffer)> write_fn_;
+  boost::function<void(std::vector<uint8_t>& buffer)> write_fn_;
 };

 typedef boost::shared_ptr<Subscriber> SubscriberPtr;
@@ -127,7 +127,7 @@ typedef boost::shared_ptr<Subscriber> SubscriberPtr;
 class ServiceClient {
 public:
   ServiceClient(ros::NodeHandle& nh, rosserial_msgs::TopicInfo& topic_info,
-      boost::function<void(std::vector<uint8_t> buffer, const uint16_t topic_id)> write_fn)
+      boost::function<void(std::vector<uint8_t>& buffer, const uint16_t topic_id)> write_fn)
     : write_fn_(write_fn) {
     topic_id_ = -1;
     if (!service_info_service_.isValid()) {
@@ -185,7 +185,7 @@ private:
   topic_tools::ShapeShifter response_message_;
   ros::ServiceClient service_client_;
   static ros::ServiceClient service_info_service_;
-  boost::function<void(std::vector<uint8_t> buffer, const uint16_t topic_id)> write_fn_;
+  boost::function<void(std::vector<uint8_t>& buffer, const uint16_t topic_id)> write_fn_;
   std::string service_md5_;
   std::string request_message_md5_;
   std::string response_message_md5_;