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

Have anyone tried to package the ros1 version of ouster-ros? #389

Open
martiege opened this issue Apr 12, 2024 · 1 comment
Open

Have anyone tried to package the ros1 version of ouster-ros? #389

martiege opened this issue Apr 12, 2024 · 1 comment

Comments

@martiege
Copy link

I tried to package ouster-ros, but end up with a pretty weird include-structure:

/nix/store/q0asldhswh6h2441kiv5zshryryx49m5-ouster-ros-0.10.0/include
/nix/store/q0asldhswh6h2441kiv5zshryryx49m5-ouster-ros-0.10.0/include
└── ouster_ros
   ├── GetConfig.h
   ├── GetConfigRequest.h
   ├── GetConfigResponse.h
   ├── GetMetadata.h
   ├── GetMetadataRequest.h
   ├── GetMetadataResponse.h
   ├── include
   │  ├── optional-lite
   │  │  └── nonstd
   │  │     └── optional.hpp
   │  ├── ouster
   │  │  ├── buffered_udp_source.h
   │  │  ├── client.h
   │  │  ├── defaults.h
   │  │  ├── image_processing.h
   │  │  ├── impl
   │  │  │  ├── cartesian.h
   │  │  │  ├── lidar_scan_impl.h
   │  │  │  ├── packet_writer.h
   │  │  │  └── profile_extension.h
   │  │  ├── lidar_scan.h
   │  │  ├── sensor_http.h
   │  │  ├── types.h
   │  │  ├── util.h
   │  │  └── version.h
   │  └── ouster_ros
   │     ├── os_point.h
   │     ├── os_ros.h
   │     └── os_sensor_nodelet_base.h
   ├── optional-lite
   │  └── nonstd
   │     └── optional.hpp
   ├── PacketMsg.h
   ├── SetConfig.h
   ├── SetConfigRequest.h
   └── SetConfigResponse.h

The headers I'm especially interested in are those in the ouster_ros/include/ouster_ros/* directory, and I'm trying to import them as #import <ouster_ros/os_point.h. This has worked before, when I've tried this without nix, though of course then I just had the ouster-ros repo in my catkin source folder, so I don't know why that worked.

{ lib, buildRosPackage, stdenv, cmake, ninja, wrapQtAppsHook, qtbase, eigen, jsoncpp, spdlog
, openssl, cppunit, pcl-ros, rviz, roscpp, message-runtime, std-msgs
, sensor-msgs, geometry-msgs, fetchFromGitHub, }:

buildRosPackage rec {
  pname = "ouster-ros";
  version = "0.10.0";

  src = fetchFromGitHub {
    owner = "ouster-lidar";
    repo = "ouster-ros";
    rev = "v${version}";
    sha256 = "sha256-0SnDs4JAZJZjjMlt5A10A9ql3be3ds8Xsp65Txy6/v4=";

    fetchSubmodules = true;
  };

  nativeBuildInputs = [ cmake ninja wrapQtAppsHook ];

  propagatedBuildInputs = [
    eigen
    jsoncpp
    spdlog
    openssl
    cppunit

    qtbase

    pcl-ros
    rviz
    roscpp
    message-runtime
    std-msgs
    sensor-msgs
    geometry-msgs
  ];

  cmakeFlags =
    [ "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_PCAP=OFF" "-DBUILD_VIZ=OFF" ];
  qtWrapperArgs = [
    # Let the gazebo binary see neighboring binaries.
    # It attempts to run gzclient from PATH.
    "--prefix PATH : ${placeholder "out"}/bin"

    # Prevent Gazebo from attempting to use Wayland.
    # As is the case with RViz2, OGRE does not yet support it.
    "--set WAYLAND_DISPLAY dummy" # "dummy" is arbitrary - it just doesn't exist.
  ];
}
@martiege
Copy link
Author

I also think I don't really need the qt-wrapper stuff here, and could use dontWrapQtApps = true; instead, but this is just a wip

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

No branches or pull requests

1 participant