public static void main(String[] arg) { RosLineModDetector detector = new RosLineModDetector("examples/drill/drill.obj"); detector.rosPointCloudSubscriber.wailTillRegistered(); System.out.println("connected to rosmaster"); }
try b = byteToUnsignedInt(byteBuffer.get()); g = byteToUnsignedInt(byteBuffer.get()); r = byteToUnsignedInt(byteBuffer.get()); a = byteToUnsignedInt(byteBuffer.get()); packet.pointColors[i] = new Color(r, g, b);
@Override public void onNewMessage(PointCloud2WithSource cloudHolder) { UnpackedPointCloud pointCloudData = RosPointCloudSubscriber.unpackPointsAndIntensities(cloudHolder.getCloud()); Point3D[] points = pointCloudData.getPoints(); Point translation = cloudHolder.getTranslation(); Point3D lidarPosition = new Point3D(translation.getX(), translation.getY(), translation.getZ()); geometry_msgs.Quaternion orientation = cloudHolder.getOrientation(); Quaternion lidarQuaternion = new Quaternion(orientation.getX(), orientation.getY(), orientation.getZ(), orientation.getW()); LidarScanMessage lidarScanMessage = new LidarScanMessage(); lidarScanMessage.getLidarPosition().set(lidarPosition); lidarScanMessage.getLidarOrientation().set(lidarQuaternion); MessageTools.packScan(lidarScanMessage, points); lidarScanPublisher.publish(lidarScanMessage); }
try b = byteToUnsignedInt(byteBuffer.get()); g = byteToUnsignedInt(byteBuffer.get()); r = byteToUnsignedInt(byteBuffer.get()); a = byteToUnsignedInt(byteBuffer.get()); packet.pointColors[i] = new Color(r, g, b);
public static void main(String[] arg) { RosLineModDetector detector = new RosLineModDetector("examples/drill/drill.obj"); detector.rosPointCloudSubscriber.wailTillRegistered(); System.out.println("connected to rosmaster"); }