Drone Simulation using GMapping and Realsense R200
Hi,
I'd like to simulate the RTF Drone from Intel which has the R200 Camera as the main sensor. I'd like to use it for mapping simulations with GMapping. I want to build a launch file to load world, quadrotor_model, r200 camera and Gmapping in Gazebo in order to do some simulations. How can I create this costomized launch file?
I can't find a tutorial how to build customized launch files, so I'm trying some reverse engineering with the hector_quadrotor and turtlebot_gazebo packages. It's very confusing since I'm really new in ROS world.
Right now I have this:
<launch>
<!-- Start Gazebo with wg world running in (max) realtime -->
<include file="$(find hector_gazebo_worlds)/launch/willow_garage.launch"/>
<!-- Spawn simulated quadrotor uav -->
<include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor.launch" >
<arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_with_kinect.xacro"/>
</include>
</launch>
I just found a drone model using kinect but would like to use the R200 camera.
EDIT:
I am trying to add the R200 camera model to quadrotor base. My quadrotor_with_r200.urdf.xacro
file looks like this:
<?xml version="1.0"?>
<robot name="quadrotor" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="M_PI" value="3.1415926535897931" />
<!-- Included URDF Files -->
<xacro:include filename="$(find hector_quadrotor_description)/urdf/quadrotor_base.urdf.xacro" />
<!-- Instantiate quadrotor_base_macro once (has no parameters atm) -->
<xacro:quadrotor_base_macro />
<!-- Intel R200 -->
<xacro:include filename="$(find drone_application)/urdf/r200_camera.urdf.xacro" />
<xacro:r200_camera name="camera" parent="base_link">
<origin xyz="0.05 0.0 -0.1" rpy="0 0 0"/>
</xacro:r200_camera>
</robot>
Very similar to Hector quadrotor_with_kinect, but I get this erros when I try to run the launchfile:
xacro.XacroException: Invalid parameter "name" while expanding macro "xacro:r200_camera"
Invalid <param> tag: Cannot load command parameter [robot_description]: command
[/opt/ros/indigo/share/xacro/xacro.py
/home/andre/catkin_ws/src/drone_application/urdf/quadrotor_with_r200.urdf.xacro myvar:=true] returned with
code [1].
Param xml is <param command="$(find xacro)/xacro.py $(arg model) myvar:=true" name="robot_description"/>
The traceback for the exception was written to the log file
What's your question?
How can I create a launch file to load in gazeebo a drone model, r200 camera and gmapping?
This update should probably be a new question but checkout the solution to #q127541
I could solve the problem, thanks a lot! Just removed the
name="camera"
in thequadrotor_with_r200.urdf.xacro
.