Giter VIP home page Giter VIP logo

Comments (3)

jagennath-hari avatar jagennath-hari commented on June 9, 2024

Hello,

It is definitely possible to extend this for your use case. Ideally for your application you would want to remove the message filter which creates a common callback and which takes both at the same rate. You can have separate callbacks for the IMU and odometry, to achieve this.

The most robust alternative would be to run the UKF update step individually and separately during IMU and odometry data. Alternatively, if you wish to produce output even faster you can create a timer callback at 300Hz which outputs the data using predictions only and when IMU (200Hz) is available it updates the UKF, similarly done for the odometry (30Hz).

Check out http://wiki.ros.org/message_filters, http://wiki.ros.org/roscpp/Overview/Timers, https://docs.ros.org/en/humble/How-To-Guides/Using-callback-groups.html and https://docs.ros.org/en/humble/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Publisher-And-Subscriber.html to get a better understanding. Keep in mind achieving this will require significant changes to the code base's architecture. Take a look at https://docs.ros.org/en/humble/Concepts/Intermediate/About-Executors.html also as running callback this fast may need multi-threading to compensate for high frequency (200Hz).

Feel free to ask any other questions.

from cuda-accelerated-visual-inertial-odometry-fusion.

antithing avatar antithing commented on June 9, 2024

Thanks! To make it even more difficult, I need to move it out of Ros as well. Will the core code run without Ros if I swap out the types?

from cuda-accelerated-visual-inertial-odometry-fusion.

jagennath-hari avatar jagennath-hari commented on June 9, 2024

Yes, you need to refactor code and switch a few types like sensor_msgs etc, in the .cuh and .cu files which has a few ROS depends. The core node is primarily written for a ROS 2 system so you would need to significantly refactor the code and make those callback manually if you want to use it for a real-time system, else you can use a dataset and load it accordingly. Make the .cuh and .cu files into a library after refactoring them, you then need to make a new ROS free node which imports your new refactored library into your system and application.

You can start looking for includes like:-
#include <rclcpp/rclcpp.hpp>
#include <rclcpp/logging.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <sensor_msgs/msg/imu.hpp>

and similarly data types used in the code and refactor them accordingly for your types. Remember to pay close attention to the CMakeLists.txt file and notice how CUDA was linked, you need to make it similarly for your application.

from cuda-accelerated-visual-inertial-odometry-fusion.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.