ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is a C++ problem more than anything else: you can only pass variables to functions, nothing else. Your current line:

ros::serialization::Serializer<const sensor_msgs::LaserScan>::read(stream,sensor_msgs::LaserScan::ConstPtr *scan);

is passing sensor_msgs::LaserScan::ConstPtr *scan to read(..). sensor_msgs::LaserScan::ConstPtr *scan is not valid C++: it's a variable declaration inside a call to a function.

If you just want to pass scan itself, you should remove sensor_msgs::LaserScan::ConstPtr from that line.