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

Using custom fields in a ROS service

asked 2017-03-28 14:13:15 -0600

MWrock gravatar image

updated 2017-03-29 01:00:13 -0600

gvdhoorn gravatar image

I'm trying to create a service to handle point clouds. Ideally I'd use a pcl::PointCloud<pcl::PointXYZI> but I'll even settle for sensor_msgs::PointCloud2.

When I try and create my service.srv as:

sensor_msgs::PointCloud2 cloud_in
---
sensor_msgs::PointCloud2 cloud_out

I get

error: <class 'genmsg.base.InvalidMsgSpec'>: sensor_msgs::PointCloud2 is not a legal message field type

EDIT:

the correct format should be sensor_msgs/PointCloud2 cloud_in

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-03-28 14:56:29 -0600

huanxiner gravatar image

Try changing sensor_msgs::PointCloud2 to sensor_msgs/PointCloud2.

edit flag offensive delete link more

Comments

that was a stupid mistake, thanks!

MWrock gravatar image MWrock  ( 2017-03-28 15:28:53 -0600 )edit

Question Tools

Stats

Asked: 2017-03-28 14:13:15 -0600

Seen: 1,200 times

Last updated: Mar 29 '17