Ask Your Question
1

Using custom fields in a ROS service

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

MWrock gravatar image

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

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 -0500

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 imageMWrock ( 2017-03-28 15:28:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 326 times

Last updated: Mar 29 '17