Skip to content

Tutorial 2: Adding Realsense R200 camera to ARDrone in Gazebo7

samaahitabelavadi edited this page Jul 5, 2017 · 3 revisions

Indoor Environment Mapping Tutorials

Adding Realsense R200 camera to ARDrone in Gazebo7

  • Required ROS Packages

    • For simulation of ARDrone in Gazebo
      1. ardrone_simulator_gazebo7 [2] - [1]
    • For simulation of Realsense R200 in Gazebo
      1. realsense_gazebo_plugin [2] - [1]
  • URDF File format

    • The Universal Robotic Description Format (URDF) is an XML file format used in ROS to describe all elements of a robot
    • URDF can only specify the kinematic and dynamic properties of a single robot in isolation. URDF can not specify the pose of the robot itself within a world
    • URDF is the main file format used in ROS and visualisation RViz
  • SDF File format

    • SDF is an XML format that describes objects and environments for robot simulators, visualisation, and control
    • Originally developed as part of the Gazebo robot simulator, SDF is a substitute for the URDF format and solves the shortcomings of the URDF format
    • SDF format is capable of describing all aspects of robots, static and dynamic objects, lighting, terrain, and even physics.
    • SDF is the main file format supported by Gazebo
  • Challenge

    • The realsense_gazebo_plugin package provides the Realsense R200 camera in SDF format
    • The ardrone_simulator_gazebo7 package provides the ARDrone in URDF format
    • The two formats are incompatible with each other and hence one file format needs to be converted to the other
  • Solution

    • Launch ardrone_testworld.launch (cvg_sim_gazebo package) to spawn the URDF of the ARDrone in Gazebo
    • Add the Realsense R200 camera into the same world from the insert tab in the left pane of Gazebo
    • Save this world from the file menu in Gazebo in .world format
    • In the world file (which is of SDF format) the Realsense camera as well as the ARDrone will be defined as models.
    • Make Realsense camera model nested inside the ARDrone model and edit the pose tag to place it at the appropriate position. Also create a fixed joint between the two models. Refer to [3]
  • Appendix

  1. Github Link for packages - https://github.com/eYSIP-2017/eYSIP-2017_Indoor-Environments-Mapping-using-UAV
  2. Link to install Gazebo7 - https://github.com/eYSIP-2017/eYSIP-2017_Indoor-Environments-Mapping-using-UAV/blob/master/bash_scripts/install_gazebo7.sh
  3. Tutorial for nested model and joint - http://gazebosim.org/tutorials?tut=nested_model&cat=build_robot#Joints
  4. Link to final world file - https://github.com/eYSIP-2017/eYSIP-2017_Indoor-Environments-Mapping-using-UAV/blob/master/realsense_gazebo_plugin/worlds/ardrone_realsense.world