Aerial Robotics IITK
  • Introduction
  • Danger Zone
  • Tutorials
    • Workspace Setup
      • Installing Ubuntu
      • Basic Linux Setup
      • Spruce up your space
      • ROS Setup
      • PX4 Setup
        • PX4 Toolchain Setup
      • Ardupilot Setup
      • Installing Ground Control Station
        • QGroundControl
        • Mission Planner
      • ArduPilot Setup on Docker
      • PX4 Setup on Docker
    • How to Write a ROS Package
      • ROS Package
      • Node Handles, Parameters, and Topics
      • Coding Standards
      • Custom mavros message
      • Transformations
      • Conversions
    • Cheatsheets
      • CMakeCheatsheet
      • GitCheatsheet
      • LatexCheatsheet
      • Markdown Cheatsheet
    • Miscellaneous
      • Odroid XU4 Setup
      • Simulation using Offboard Control
        • Enable Offboard Mode in PX4
      • Writing a UDev rule
      • Sensor fusion
    • Reference wiki links
  • Concepts
    • Quaternions
      • Theory
    • Kalman Filters
    • Rotations
    • Path Planning
      • Grassfire Algorithm
      • Dijkstra Algorithm
      • A* Algorithm
      • Probabilistic Roadmap
      • RRT Algorithm
      • Visibility Graph Analysis
    • Lectures
      • Aerial Robotics
      • Avionics
      • Control Systems: Introduction
      • Control Systems: Models
      • Inter IIT Tech Meet 2018
      • Kalman Filters
      • Linux and Git
      • Git Tutorial
      • ROS
      • Rotorcraft
      • Software Training
  • Control System
    • Model Predictive Control
      • System Identification
      • Sample SysId Launch Files
      • Running MPC
        • MPC with Rotors
        • MPC with PX4 Sim
        • MPC with ROS
      • References
    • PID Controller
      • Introduction
      • Basic Theory
  • Estimation
    • Visual-Inertial Odometry
      • Hardware Requirements
      • Visual-Inertial Sensing
      • DIYing a VI-Sensor
    • Setup with VICON
    • Odometry from pose data
  • Computer Vision
    • Intel RealSense D435i setup for ROS Noetic
    • IntelRealSense D435i Calibration
    • Camera Calibration
    • ArUco ROS
  • Machine Learning
    • Datasets
  • Hardware Integration
    • Configuring Radio Telemetry
    • Setting up RTK + GPS
    • Integration of Sensors with PixHawk
      • Connecting Lidar-lite through I2C
    • Connections
    • Setting up Offboard Mission
      • Setting up Companion Computer
        • Raspberry Pi 4B Setup
        • Jetson TX2 Setup
      • Communication Setup
      • Guided mode
    • Miscellaneous
  • Resources
    • Open-source algorithms and resources
    • Courses
      • State Space Modelling of a Multirotor
      • Path Planning Lecture
      • Introduction to AI in Robotics
      • RRT, RRT* and RRT*- Path Planning Algorithms
    • Useful Reading Links
      • Aerial Robotics
      • Books
      • Computer Vision and Image Processing
      • Courses on AI and Robotics
      • Deep Neural Network
      • Dynamics and Controls system
      • Motion Planning
      • Probabilistic Robotics
      • Programming
      • Robotics Hardware
      • Miscellaneous and Awesome
    • Online Purchase websites
  • Competitions
    • Inter-IIT TechMeet 8.0
    • Inter-IIT TechMeet 9.0
    • IMAV 2019, Madrid, Spain
    • Inter-IIT TechMeet 10.0
    • Inter-IIT TechMeet 11.0
Powered by GitBook
On this page
  • Installing Kalibr
  • Recording a Rosbag
  • Calibrating the Camera Using AprilGrid

Was this helpful?

  1. Computer Vision

IntelRealSense D435i Calibration

Calibration of IntelRealSenseD435i using AprilGrid

Installing Kalibr

Building Kalibr from Source

  1. Install the necessary dependencies:

    sudo apt-get install -y git wget autoconf automake nano libeigen3-dev libboost-all-dev libsuitesparse-dev doxygen libopencv-dev libpoco-dev libtbb-dev libblas-dev liblapack-dev libv4l-dev python3-dev python3-pip python3-scipy python3-matplotlib ipython3 python3-wxgtk4.0 python3-tk python3-igraph python3-pyx
  2. Create and configure a workspace:

    mkdir -p ~/kalibr_workspace/src
    cd ~/kalibr_workspace
    export ROS1_DISTRO=noetic # Replace 'noetic' with your ROS version
    source /opt/ros/$ROS1_DISTRO/setup.bash
    catkin init
    catkin config --extend /opt/ros/$ROS1_DISTRO
    catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
  3. Clone the Kalibr project and build it:

    cd ~/kalibr_workspace/src
    git clone https://github.com/ethz-asl/kalibr.git
    cd ~/kalibr_workspace/
    catkin build -DCMAKE_BUILD_TYPE=Release -j4

    Source the workspace setup:

    source ~/kalibr_workspace/devel/setup.bash

Recording a Rosbag

To record a rosbag, follow these steps:

  1. Start ROS using the command:

    roscore
  2. Install the IntelRealSense ROS package for your ROS distribution:

    sudo apt-get install ros-$ROS_DISTRO-realsense2-camera
    source devel/setup.bash
  3. Launch the camera node using:

    roslaunch realsense2_camera rs_camera.launch
  4. Check that camera topics are listed with:

    rostopic list

    You should see topics such as camera/color/image_raw.

  5. Record a rosbag from all topics:

    rosbag record -a

    Press Ctrl+C to stop recording. The rosbag will be saved in the current directory.

    Important points during recording:

    • Excite all IMU axes (rotation and translation).

    • Avoid shocks, especially at the beginning and end of recording.

    • Maintain low motion blur through low shutter times and good illumination.

    • Ensure timestamps have low jitter and are synchronized.

  6. Check the rosbag info and play it using:

    rosbag info
    rosbag play

Calibrating the Camera Using AprilGrid

  1. Ensure the AprilGrid details are specified in a .yaml file.

  2. To calibrate the camera, run the following command in the directory containing the .yaml file and rosbag:

    rosrun kalibr kalibr_calibrate_cameras --target [name of .yaml file] --models [camera/distortion models to be fitted] --topics [name of topic where image from camera is being published] --bag [path to rosbag] --bag-freq 10.0 --show-extraction

    Notes:

    • The camera distortion model used should be pinhole-radtan.

    • The --show-extraction flag shows the calibration alongside the feed.

    • The --bag-freq 10.0 sets the playback frequency of the rosbag to 10 Hz during calibration.

The results of the calibration process will be saved in a PDF and the matrix parameters will be stored in a .yaml file in the same directory.

PreviousIntel RealSense D435i setup for ROS NoeticNextCamera Calibration

Last updated 1 year ago

Was this helpful?