Usage

C++ Example

After installing the motion3d C++ library, you can place CMakeLists.txt and main.cpp in one directory and run the following commands to build and run the example:

mkdir build && cd build
cmake ..
make
./motion3d_example
CMakeLists.txt
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(motion3d_example)

find_package(motion3d REQUIRED)

add_executable(motion3d_example main.cpp)
target_link_libraries(motion3d_example motion3d::motion3d)
main.cpp
#include <motion3d/motion3d.hpp>

namespace m3d = motion3d;

int main(int argc, char **argv)
{
  m3d::DualQuaternionTransform dq;
  std::cout << dq.toString() << std::endl;
}

Python Example

After installing motion3d in your Python venv, you can run the following example:

motion3d_example.py
#!/usr/bin/env python3
import motion3d as m3d


def main():
    dq = m3d.DualQuaternionTransform()
    print(dq.toString())


if __name__ == '__main__':
    main()

Python Scripts

All scripts are installed executable with the motion3d Python bindings. You can the respective script with -h for further details.

Script

Description

Additional Requirements

m3d_convert_kitti_odometry

Convert data from the KITTI odometry dataset

m3d_convert_rosbag

Extract transformations from a rosbag

rosbags

m3d_plot_poses

Plot poses from an M3D file

matplotlib