ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Adding thermal camera plugin to the robot description in another package

asked 2016-05-31 10:00:52 -0600

RSA_kustar gravatar image

I want to use the thermal camera in my robot. I have 3 pcks : the first package that has the launch file where I it looks from the second pkg for the robot discreption that uses the plugins or the sensor from the third packgae.

I did the following: In package 3: I downloaded the package hector_gazebo from this link

In package 2:

I have the file1.xacro file that has all the sensors that the robot has and I added the following sensor

 <robot xmlns:xacro=""> 

 <!-- here are all the plugins and the other sensors like the cameras, imu and the depth cameras and all other macros --> 
 <!-- thermal -->
<xacro:macro name="thermal_camera"
params="namespace parent_link camera_suffix frame_rate
  horizontal_fov image_width image_height image_format min_distance
  max_distance noise_mean noise_stddev enable_visual *geometry *origin">
<link name="${namespace}/camera_${camera_suffix}_link">
    <origin xyz="0 0 0" rpy="0 0 0" />
      <xacro:insert_block name="geometry" />
  <xacro:if value="${enable_visual}">
      <origin xyz="0 0 0" rpy="0 0 0" />
        <xacro:insert_block name="geometry" />
      <material name="red" />
    <mass value="1e-5" />
    <origin xyz="0 0 0" rpy="0 0 0" />
    <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
<joint name="${namespace}/camera_${camera_suffix}_joint" type="fixed">
  <xacro:insert_block name="origin" />
  <parent link="${parent_link}" />
  <child link="${namespace}/camera_${camera_suffix}_link" />
<gazebo reference="${namespace}/camera_${camera_suffix}_link">
  <sensor type="camera" name="${namespace}_camera_${camera_suffix}">
    <camera name="head">
        <!-- Noise is sampled independently per pixel on each frame.
             That pixel's noise value is added to each of its color
             channels, which at that point lie in the range [0,1]. -->
    <plugin name="thermal_camera_controller" filename="">

</xacro:macro> </robot>

I run the following command: rosrun xacro file1.xacro the output was the following: <-- <robot xmlns:xacro=""> </robot>

I edited the pkg.xml in package 2 file to be the following :


I also modified the Cmake.list file in package 2 like the following:

cmake_minimum_required(VERSION 2.8.3)
find_package(catkin REQUIRED COMPONENTS hector_gazebo_thermal_camera)
find_package(gazebo REQUIRED)
## Find Boost
find_package(Boost REQUIRED COMPONENTS thread)

then I added the following ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-06-01 01:25:03 -0600

You can find a comprehensive example of a robot equipped with the a simulated thermal camera here: tracker_default.urdf.xacro.

There, the flir_a35_camera macro is used.

You can install a complete working workspace with which allows spawning the robot in Gazebo as described in hector_tracker_install.

From this example you should be able to look up everything you're interested in. It looks like the error you're getting is related to your launch file setup, possibly in your spawn_robot.launch file.

edit flag offensive delete link more


Thank you it worked with me. I downloaded the package and added the required tags from the tracker_default.urdf.xacro file and it worked.

RSA_kustar gravatar image RSA_kustar  ( 2016-06-04 11:03:14 -0600 )edit

Question Tools

1 follower


Asked: 2016-05-31 10:00:52 -0600

Seen: 776 times

Last updated: Jun 01 '16