Skip to content

Subscription for PointCloud2 is not working #726

Open
@apoorvcn47

Description

@apoorvcn47

Description
I am trying subscribe to a Pointcloud2 topic but my subscription callback function never triggers. Similar styled subsciptions work for Image and MarkerArray topics.

let pc_topic = new ROSLIB.Topic(
{
    ros : ros,
    // name : '/camera/color/image_raw',
    // messageType : 'sensor_msgs/msg/Image',
    name : '/camera/depth_registered/points',
    messageType : 'sensor_msgs/msg/PointCloud2',
    // name : '/rviz/pallet1',
    // messageType : 'visualization_msgs/MarkerArray',
    // latch : true
});
// render_ob.create_pointcloud_sub(pc_topic);
pc_topic.subscribe(function(message) 
{
    console.log('message.width');
    console.log(message.width);
    console.log(message.height);
});

I was wondering if anyone has come across this.

  • Library Version: v2
  • ROS Version: Humble
  • Platform / OS: Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions