Skip to content

Commit

Permalink
pixi setup, can build now on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Oct 30, 2023
1 parent c8f3321 commit e8714b0
Show file tree
Hide file tree
Showing 5 changed files with 12,486 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Build directory
build
compile_commands.json
*.vrs

# Pixi environment
.pixi
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.16...3.27)

project(vrs_example LANGUAGES CXX)
project(rerun_vrs_example LANGUAGES CXX)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# if(NOT DEFINED CMAKE_CXX_STANDARD)
# endif()

set(CMAKE_CXX_STANDARD 17)
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()

include(FetchContent)
FetchContent_Declare(rerun_sdk DOWNLOAD_EXTRACT_TIMESTAMP ON URL https://build.rerun.io/commit/2ec5ce7/rerun_cpp_sdk.zip)
FetchContent_Declare(rerun_sdk URL https://build.rerun.io/commit/b7f404a/rerun_cpp_sdk.zip) # 2023-10-29
FetchContent_MakeAvailable(rerun_sdk)

include(FetchContent)
Expand All @@ -19,7 +18,8 @@ FetchContent_MakeAvailable(vrslib)

find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(fmt REQUIRED)

add_executable(log_vrs src/main.cpp src/FramePlayer.cpp src/IMUPlayer.cpp src/utils.cpp)
target_link_libraries(log_vrs Eigen3::Eigen ${OpenCV_LIBS} rerun_sdk vrslib vrs_utils)
target_include_directories(log_vrs PRIVATE src)
add_executable(rerun_vrs_example src/main.cpp src/FramePlayer.cpp src/IMUPlayer.cpp src/utils.cpp)
target_link_libraries(rerun_vrs_example Eigen3::Eigen ${OpenCV_LIBS} rerun_sdk vrslib vrs_utils fmt)
target_include_directories(rerun_vrs_example PRIVATE src)
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

This is an example that shows how to use [Rerun](https://github.com/rerun-io/rerun)'s C++ API to log and view VRS files.

## Installing the Rerun viewer
The Rerun C++ SDK works by connecting to an awaiting Rerun Viewer over TCP.

#### Building from source
* [Install `cargo`](https://rustup.rs/)
* `cargo install rerun-cli`

#### Using `pip`
* `pip install rerun-sdk`

### Running the Rerun viewer
Just type `rerun` and the rerun viewer should show up. Then it is time to run this example!


## How to build and run

```bash
Expand All @@ -10,3 +24,7 @@ cd build
cmake ..
cmake --build .
```

---------------------------

TODO: Pixi describe setup etc.
Loading

0 comments on commit e8714b0

Please sign in to comment.