Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thermal camera to Marble HD2 #773

Merged
merged 8 commits into from
Feb 11, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,33 @@
<remap from="/model/$(arg name)/gas_detected" to="gas_detected"/>
</node>

<!-- Thermal Camera -->
<!-- Note camera_info topic generated by ign-gazebo incorrectly removes
sensor name in topic string -->
<node
pkg="ros_ign_bridge"
type="parameter_bridge"
name="ros_ign_bridge_thermal_camera"
args="$(arg sensor_prefix)/camera_info@sensor_msgs/CameraInfo[ignition.msgs.CameraInfo">
<remap from="$(arg sensor_prefix)/camera_info" to="thermal_camera/camera_info"/>
</node>
<node
pkg="ros_ign_image"
type="image_bridge"
name="ros_ign_image_thermal_camera"
args="$(arg sensor_prefix)/thermal_camera">
<remap from="$(arg sensor_prefix)/thermal_camera" to="thermal_camera/image_raw"/>
</node>
<node
pkg="subt_ros"
type="optical_frame_publisher"
name="optical_frame_publisher_image_thermal_camera">
<remap from="input/image" to="thermal_camera/image_raw" />
<remap from="output/image" to="thermal_camera/optical/image_raw" />
<remap from="input/camera_info" to="thermal_camera/camera_info" />
<remap from="output/camera_info" to="thermal_camera/optical/camera_info" />
</node>

<group if="$(arg breadcrumbs)">
<node
pkg="ros_ign_bridge"
Expand Down
73 changes: 55 additions & 18 deletions submitted_models/marble_hd2_sensor_config_1/model.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<pose>0 0 -0.135 0 0 1.57</pose>
<geometry>
<mesh>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/meshes/hd2.dae</uri>
<uri>meshes/hd2.dae</uri>
<submesh>
<name>Body</name>
<center>false</center>
Expand All @@ -154,20 +154,57 @@
<specular>1.0 1.0 1.0</specular>
<pbr>
<metal>
<albedo_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Albedo.png</albedo_map>
<metalness_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Metalness.png</metalness_map>
<roughness_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Roughness.png</roughness_map>
<albedo_map>materials/textures/HD2_Albedo.png</albedo_map>
<metalness_map>materials/textures/HD2_Metalness.png</metalness_map>
<roughness_map>materials/textures/HD2_Roughness.png</roughness_map>
</metal>
</pbr>
<!-- fallback to script if no PBR support-->
<script>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/scripts/</uri>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/</uri>
<uri>materials/scripts/</uri>
<uri>materials/textures/</uri>
<name>HD/HD2_Diffuse</name>
</script>
</material>
</visual>

<!-- thermal camera -->
<visual name="thermal_camera_visual">
<pose>0.435 -.01 0.125 0 0 0</pose>
<geometry>
<box>
<size>0.02 0.025 0.025</size>
</box>
</geometry>
</visual>
<sensor name="thermal_camera" type="thermal">
<pose>0.435 -.01 0.125 0 0 0</pose>
<camera name="thermal_camera">
<horizontal_fov>1.047</horizontal_fov>
adlarkin marked this conversation as resolved.
Show resolved Hide resolved
<lens>
<intrinsics>
<!-- fx = fy = width / ( 2 * tan (hfov / 2 ) ) -->
<fx>332.62963</fx>
<fy>332.62963</fy>
<!-- cx = ( width + 1 ) / 2 -->
<cx>192.5</cx>
<!-- cy = ( height + 1 ) / 2 -->
<cy>144.5</cy>
<s>0</s>
</intrinsics>
</lens>
<image>
<width>384</width>
<height>288</height>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
adlarkin marked this conversation as resolved.
Show resolved Hide resolved
</camera>
<always_on>1</always_on>
<update_rate>25</update_rate>
</sensor>
<!-- Based on Intel realsense D435 (intrinsics and distortion not modeled)-->
<sensor name="camera_front" type="rgbd_camera">
<camera name="camera_front">
Expand Down Expand Up @@ -895,7 +932,7 @@
<pose>0 0 0 0 0 1.57</pose>
<geometry>
<mesh>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/meshes/hd2.dae</uri>
<uri>meshes/hd2.dae</uri>
<submesh>
<name>CameraPivot</name>
<center>true</center>
Expand All @@ -907,14 +944,14 @@
<specular>1.0 1.0 1.0</specular>
<pbr>
<metal>
<albedo_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Albedo.png</albedo_map>
<metalness_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Metalness.png</metalness_map>
<roughness_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Roughness.png</roughness_map>
<albedo_map>materials/textures/HD2_Albedo.png</albedo_map>
<metalness_map>materials/textures/HD2_Metalness.png</metalness_map>
<roughness_map>materials/textures/HD2_Roughness.png</roughness_map>
</metal>
</pbr>
<script>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/scripts/</uri>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/</uri>
<uri>materials/scripts/</uri>
<uri>materials/textures/</uri>
<name>HD2/HD2_Diffuse</name>
</script>
</material>
Expand Down Expand Up @@ -957,7 +994,7 @@
<pose>0.005 0.015 0.038 0 0 -1.570796</pose>
<geometry>
<mesh>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/meshes/hd2.dae</uri>
<uri>meshes/hd2.dae</uri>
<submesh>
<name>CameraTilt</name>
<center>true</center>
Expand All @@ -969,15 +1006,15 @@
<specular>1.0 1.0 1.0</specular>
<pbr>
<metal>
<albedo_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Albedo.png</albedo_map>
<metalness_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Metalness.png</metalness_map>
<roughness_map>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/HD2_Roughness.png</roughness_map>
<albedo_map>materials/textures/HD2_Albedo.png</albedo_map>
<metalness_map>materials/textures/HD2_Metalness.png</metalness_map>
<roughness_map>materials/textures/HD2_Roughness.png</roughness_map>
</metal>
</pbr>
<!-- fallback to script if no PBR support-->
<script>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/scripts/</uri>
<uri>model://MARBLE_HD2_SENSOR_CONFIG_1/materials/textures/</uri>
<uri>materials/scripts/</uri>
<uri>materials/textures/</uri>
<name>HD/HD2_Diffuse</name>
</script>
</material>
Expand Down