Sophus

Jan 1, 2024 | Data Science

2D and 3D Lie Groups for Computer Vision and Robotics

This is a C++ implementation of Lie groups commonly used for 2D and 3D geometric problems, particularly in Computer Vision and Robotics applications. Among others, this package includes the special orthogonal groups SO(2) and SO(3) to represent rotations in 2D and 3D, as well as the special Euclidean group SE(2) and SE(3) to represent isometries, also known as rigid body transformations (i.e., rotations and translations) in 2D and 3D.

Status

Sophus (i.e., Sophus 1) is currently in maintenance mode. As of June 2024, there are plans to refrain from adding larger new features; future pull requests (PRs) will likely be limited to bug fixes, small improvements, and toolchain updates.

However, next iterations of Sophus are under development:

  • sophus2: The next C++ iteration of Sophus, which is a complete rewrite. It includes not only the Lie groups but also more geometric concepts such as unit vectors, splines, image classes, camera models, and more. It is hosted as part of the farm-ng-core repository and is currently used by a few community members.
  • sophus-rs: A Rust version of Sophus that features a similar inclusion of geometric concepts and an early version of a non-linear least squares optimization library. So far, it has only a few community users. Check it out at sophus-rs GitHub and Crates.io.

How to Build Sophus from Source

Building Sophus from source requires a C++17 compiler (though older versions may still build with C++14). It’s primarily tested on Linux and macOS. While there was previous success on Windows, there is currently no CI support for it, meaning some patches may be required for successful builds.

While there are no comprehensive build instructions, inspecting the install scripts as well as the main.yml file could provide a solid understanding of how to build the required dependencies.

Installing Sophus through Vcpkg

You can also build and install Sophus using the vcpkg dependency manager by following these steps:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install sophus

The Sophus port in vcpkg is maintained and kept up to date by Microsoft team members and community contributors. If the version is outdated, please create an issue or pull request on the vcpkg repository.

Troubleshooting

If you encounter issues during the installation or building process, here are a few troubleshooting tips to guide you:

  • Ensure that you have a compatible C++ compiler installed. Check your compiler version and switch to C++17 if necessary.
  • For Windows users, remember that additional patches may be required since there’s no current CI support. Check forums or GitHub discussions for community advice.
  • If you get stuck, reviewing the install scripts can often shed light on build dependencies and procedures.
  • When in doubt, searching for issues and threads related to Sophus on platforms like GitHub could offer insights or solutions from other users.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox