Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge point cloud packed #28

Merged
merged 4 commits into from
Jul 16, 2019
Merged

Bridge point cloud packed #28

merged 4 commits into from
Jul 16, 2019

Conversation

@chapulina
Copy link
Contributor

I tried adding a demo in on branch packed_demo using the new message but the point cloud is not showing on RViz. The ROS message data is suspiciously short:

header:
  seq: 105
  stamp:
    secs: 10
    nsecs: 500000000
  frame_id: "model_with_lidar/link/gpu_lidar"
height: 1
width: 1
fields:
  -
    name: "x"
    offset: 0
    datatype: 7
    count: 1
  -
    name: "y"
    offset: 4
    datatype: 7
    count: 1
  -
    name: "z"
    offset: 8
    datatype: 7
    count: 1
is_bigendian: False
point_step: 12
row_step: 12
data: [0, 0, 128, 127, 0, 0, 128, 255, 0, 0, 192, 255]
is_dense: True

So is the Ignition data:

header {
  stamp {
    sec: 13
    nsec: 500000000
  }
  data {
    key: "frame_id"
    value: "model_with_lidar::link::gpu_lidar"
  }
}
field {
  name: "x"
  datatype: FLOAT32
  count: 1
}
field {
  name: "y"
  offset: 4
  datatype: FLOAT32
  count: 1
}
field {
  name: "z"
  offset: 8
  datatype: FLOAT32
  count: 1
}
height: 1
width: 1
point_step: 12
row_step: 12
data: "\000\000\200\177\000\000\200\377\000\000\300\377"
is_dense: true

I'm still looking into what could be going on. It could be a problem with my local setup.

@nkoenig
Copy link
Contributor Author

nkoenig commented Jul 15, 2019

Your width and height are 1. Is that intentional?

@chapulina
Copy link
Contributor

Oh I hadn't noticed that detail on the message. I'm running this example world. The laser scans are going through fine. It could be an issue with my setup, I'll try your updated branches soon.

@chapulina chapulina mentioned this pull request Jul 15, 2019
@chapulina
Copy link
Contributor

The GPU lidar works for me with the new branches. The depth cloud looks mirrored though. This is using the demo on #29 :

rgbd_bridge_mirror

@nkoenig
Copy link
Contributor Author

nkoenig commented Jul 16, 2019

@nkoenig
Copy link
Contributor Author

nkoenig commented Jul 16, 2019

Are you having trouble with the depth_image in rviz? I see all black.

@chapulina
Copy link
Contributor

Are you having trouble with the depth_image in rviz? I see all black.

You need this fix, it hasn't been released yet: ros-visualization/rviz#1378

@nkoenig
Copy link
Contributor Author

nkoenig commented Jul 16, 2019

Ahh, thanks.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. We need to wait for a couple of releases before merging. And some basic tests would also be nice.

{
convert_1_to_ign(ros1_msg.header, (*ign_msg.mutable_header()));

std::cerr << "Unsupported conversion from [sensor_msgs::PointCloud2] to "
<< "[ignition::msgs::PointCloud]" << std::endl;
}

template<>
void
convert_ign_to_1(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the messages are so similar, it shouldn't be a lot of trouble to add the reverse conversion, and some tests with some dummy data.

@nkoenig
Copy link
Contributor Author

nkoenig commented Jul 16, 2019

Add other direction and tests.

Nate Koenig added 2 commits July 16, 2019 13:27
@nkoenig nkoenig merged commit dd4ab61 into master Jul 16, 2019
@chapulina chapulina deleted the pointcloudpacked branch July 16, 2019 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants