Giter Site home page Giter Site logo

aruco_gridboard's Introduction

Changes to use aruco_gridboard for camera pose estimation

I added transform and message to publish camera pose to /mavros/vision_pose/pose topic to use with mavros package and a multirotor with Arducopter for autonomous indoor flight. I added also a launch file detection_rpi.launch that use gscam to get video streamed with gstreamer.

Moreover create_board, useful to create a board as image file, has been modified to write a layout.yaml file (to stdout) to use with the package, see layout-my.yaml as example.

aruco_gridboard

This node detect the ARUCO board that is on the target. It then publishes the corresponding pose in the /vision/pose topic.

Installation

OpenCV 3.2

Clone and build OpenCV from source with the extra modules

$ cd <opencv_build_directory>
$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
$ make -j5

vision_opencv

To use aruco with ROS, we need to use opencv 3.2. Since that we need cv_bridge, we have to rebuild vision_opencv from source. Otherwise cv_bridge is built with opencv2. link You can clone vision_opencv in your catkin_ws/scr and after build with:

$ cd ~/catkin_ws
$ catkin_make -DOpenCV_DIR=/path-to-build-opencv-3.2

When catkin_make has finish, you can check if the cv_bridge is using the right version of OpenCV with the following commands:

$ cd ~/catkin_ws/devel/lib
$ ldd libcv_bridge.so | grep opencv
	libopencv_core.so.3.2 => /home/jokla/Software/opencv-3.2.0/build/lib/libopencv_core.so.3.2 (0x00007f7acb240000)
	libopencv_imgcodecs.so.3.2 => /home/jokla/Software/opencv-3.2.0/build/lib/libopencv_imgcodecs.so.3.2 (0x00007f7acaffe000)
	libopencv_imgproc.so.3.2 => /home/jokla/Software/opencv-3.2.0/build/lib/libopencv_imgproc.so.3.2 (0x00007f7ac97ca000)

aruco_gridboard

Now you can clone aruco_gridboard in your catkin_ws and build with catkin_make

$ cd ~/catkin_ws/src
$ git clone https://github.com/jokla/aruco_gridboard.git
$ cd ..
$ catkin_make
$ source devel/setup.bash

How to use it

Add the new OpenCV to the path:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/jokla/Software/opencv-3.2.0/build/lib/
Launch the detection node:
roslaunch aruco_gridboard detection.launch

Here you can see an example of the launch file:

<launch>  
  <!-- Launch the detection node -->
  <node pkg="aruco_gridboard" type="aruco_gridboard" name="aruco_gridboard" output="screen" >
    <param name="board_path" value="$(find aruco_gridboard)/data/layout.yaml" />
    <param name="detector_param_path" value="$(find aruco_gridboard)/data/detector_params.yml" />
    <param name="debug_display" value="True" />
   
    <remap from="/aruco_gridboard/camera_info" to="/camera/camera_info"/>
    <remap from="/aruco_gridboard/image_raw" to="/camera/image"/>
  </node>

</launch>

The node is subscribing to the image topic /camera/image and the topic /camera/camera_info containing the camera parameters. Aruco will try to detect the board described by the yaml file (you can set in with the parameter board_path and it will publish the board pose on the topic /vision/pose and the detection status on the topic /vision/status.

aruco_gridboard's People

Contributors

anbello avatar jokla avatar

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.