Project implementation of AR-tag detection | OpenCV | Computer Vision ROS2 Tutorials | [Tutorial 13]

Поділитися
Вставка
  • Опубліковано 11 лип 2024
  • Wish to create interesting robot motion and have control over your world and robots in Webots? Soft_illusion Channel is here with a new tutorial series on the integration of Webots and ROS2. (A channel which aims to help the robotics community).
    #ROS2_tutorial #ROS2_project #ROS2_computer_vision
    Github link :
    github.com/koyalbhartia/webot...
    Video series:
    1. ROS 2, Webots installation and Setup of a workspace in VS Code
    2. Different examples in Webots with ROS2
    3. Use ROS2 services to interact with robots in Webots
    4. Control a robot with ROS2 Publisher
    5. Get feedback from different sensors of Robot with ROS2 Subscriber
    6. Implement Master and Slave robots project with ROS2
    7. Setup Rviz2 (Showing different sensor output )
    8. Ways to debug projects with Rostopic echo, Rostopic info, RQT_graph
    9. Use advance debugging tools like Rqt console, Rqt gui
    10 & 11. Implementation of SLAM toolbox or LaMa library for unknown environment.
    12. & 13. Implementation of AR-tag detection and getting exact pose from camera.
    Note: Following are the system specifications that will be used in the tutorial series.
    Ubuntu 20.04, ROS 2 Foxy, Webots R2020b-rev1
    01:03 Camera enable
    06:01 Computer vision pipeline
    15:25 Setup.py
    17:38 Launch file
    20:34 Build and Run project
    1. Camera enable
    In this section we primarily show the process to make a service and enable the camera using the function “start_device_manager”. This function takes in a dictionary of sensors present in the robot. In our case we only have one camera. The dictionary takes the key as sensor name and value as both the time step of publishing and topic name on which it is to be published.
    Link to refer the details :
    github.com/cyberbotics/webots...
    We also enable wheels in this node in order to facilitate the motion of the robot in order to search the AR tag and propagate towards it.
    2. Computer vision pipeline
    In this vision pipeline we discuss how we take in images and process the image in order to get useful data.
    It includes:
    Load the dictionary of AR tags.
    Provide distortion matrix and camera matrix.
    Detect the AR tag and identify its ID.
    Take in the exact dimension of the AR tag in the world and calculate the translation and rotation from the camera.
    Rotate wheels of the robot in order to reduce the error and propagate towards the AR tag.
    If the size of the AR tag in the camera frame increases more than 40% in height, stop as we have reached the goal position.
    3. Setup.py
    Here we study how to integrate the different world files, protos and the launch file in setup.py in order to be used by the ROS2 framework.
    4. Launch file
    This section shows how to write a launch file in order to make this project work. It has 2 parts:
    In the first part we use an inbuilt webots framework to call the world and other files where all the sensors and wheels in the custom robot are enabled.
    In the second part we make a computer vision pipeline node. This node takes in raw images and processes the data. Finally it spits out cmd_vel and a processed image which has a frame marked on them in order to represent translation and rotation.
    5. Build and Run project:
    Finally, we build the project again. To do this, we first we go to the repo directory which in our case is: “cd ~/AR_ws/” then do colcon build. This builds all the packages in the repository.
    After this as a mandatory step we need to source the package so that ROS2 can register all the packages in the repository.
    source install/setup.bash
    And finally we run the project using the launch file using the following steps:
    ros2 launch webots_ros2_tutorials ar_detection_launch.py
    Webots ROS2 tutorial series is available here: • Webots ROS2 tutorial s...
    Introductory Webots tutorial playlist:
    www.youtube.com/watch?v=yi4e5...
    Facebook link to the Intro Video Artist, Arvind Kumar Bhartia:
    / arvindkumar.bhartia.9
    Comment if you have any doubts on the above video.
    Do Share so that I can continue to make many more videos with the same boost. :)
    Happy Coding. :)

КОМЕНТАРІ • 13

  • @user-xn5fq2zw4u
    @user-xn5fq2zw4u 2 роки тому +1

    Love u bro! This is a very nice video!

  • @joeyzhou8273
    @joeyzhou8273 3 роки тому +1

    Hi, can you make a tutorial on how to use webot's predefined sensors? Like Velodyne lidars. Or have you already mentioned that in previous videos?

    • @coolrobotics
      @coolrobotics  3 роки тому

      It will be a great exercise for you to look at standard examples of webots in order to get insights of existing models.

  • @ylchan766
    @ylchan766 3 роки тому +1

    Thanks a lot for the series! May I know where I could get the source code for this tutorial? Cannot find eg. the custom_ar_tag.wbt in the original repo nor in your fork

    • @coolrobotics
      @coolrobotics  3 роки тому

      github.com/koyalbhartia/webots_ros2

  • @jeewooo364
    @jeewooo364 Рік тому

    Can you do one or have you done one for gazebo as well?

  • @bohdantanasov7013
    @bohdantanasov7013 3 роки тому +1

    Hi. For my project I need to use several robots, I thought that I could just add another robot prototype and work with it in the same way as with the first one. But it turned out that there are problems with this, because as soon as I add another robot, the first robot stops responding to my node. Therefore, your advice is needed how can I use several robots?
    Can they use each other's topics? how to organize their work in ROS2 and Webots? I would be very grateful for your advice.

    • @coolrobotics
      @coolrobotics  3 роки тому

      I think this issue is because of registration of multiple nodes with same name.
      You can read about namespacing and do the same for your different robot nodes and topics.
      For example one robot will have a/cmd_vel other will have b/cmd_vel etc .

  • @kamal2046
    @kamal2046 3 роки тому +1

    Hi, Are you open to accepting a project ?

    • @coolrobotics
      @coolrobotics  3 роки тому

      Can you share the details on harsh.b.kakashaniya@gmail.com

    • @kamal2046
      @kamal2046 3 роки тому +1

      @@coolrobotics please check your email. Thanks

    • @coolrobotics
      @coolrobotics  3 роки тому

      Sure Thanks