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
Merged

Conversation

adlarkin
Copy link
Contributor

@adlarkin adlarkin commented Feb 1, 2021

This adds two new sensor configurations to MARBLE HD2:

  • sensor configuration 3: same as configuration 1, but with a thermal camera
  • sensor configuration 4: same as configuration 2, but with a thermal camera

Camera specifications were retrieved from:

Below shows the code to be added to these fuel model's model.sdf files, and where this camera would end up on the robot with this code snippet added in:

      <!-- 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>0.4922</horizontal_fov>
          <lens>
            <intrinsics>
              <!-- fx = fy = width / ( 2 * tan (hfov / 2 ) ) -->
              <fx>764.35630</fx>
              <fy>764.35630</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>
        </camera>
        <always_on>1</always_on>
        <update_rate>25</update_rate>
      </sensor>

camera_location_hd2

Signed-off-by: Ashton Larkin [email protected]

@adlarkin adlarkin requested a review from iche033 February 1, 2021 23:14
@adlarkin adlarkin marked this pull request as draft February 1, 2021 23:14
@osrf-jenkins
Copy link

Build finished. 21 tests run, 0 skipped, 1 failed.

@adlarkin adlarkin changed the title Add thermal camera to robot models Add thermal camera to marble_hd2_sensor_config_1 Feb 2, 2021
@osrf-jenkins
Copy link

Build finished. 21 tests run, 0 skipped, 1 failed.

@iche033
Copy link
Contributor

iche033 commented Feb 2, 2021

It looks like the ignition side is missing the thermal camera's camera_info topic.

The info topic is published through this call:
https://github.com/ignitionrobotics/ign-sensors/blob/ign-sensors4/src/ThermalCameraSensor.cc#L217

so looks like something went wrong there. I'll look into it tomorrow

I see data coming through ign topic. Did you add IGN_TRANSPORT_TOPIC_STATISTICS=1 ?

After removing the /image suffix from $(arg sensor_prefix)/thermal_camera/image in vehicle_topics.launch, I see data coming through on ros side.

@osrf-jenkins
Copy link

Build finished. 21 tests run, 0 skipped, 1 failed.

@osrf-jenkins
Copy link

Build finished. 21 tests run, 0 skipped, 1 failed.

@osrf-jenkins
Copy link

Build finished. 21 tests run, 0 skipped, 1 failed.

@adlarkin adlarkin marked this pull request as ready for review February 3, 2021 17:15
@adlarkin adlarkin requested a review from nkoenig February 3, 2021 17:15
@adlarkin adlarkin changed the title Add thermal camera to marble_hd2_sensor_config_1 Add thermal camera to Marble HD2 Feb 3, 2021
@osrf-jenkins
Copy link

Build finished. 21 tests run, 0 skipped, 1 failed.

1 similar comment
@osrf-jenkins
Copy link

Build finished. 21 tests run, 0 skipped, 1 failed.

@adlarkin
Copy link
Contributor Author

adlarkin commented Feb 3, 2021

@iche033 I just tested both configs 3 and 4, they are working for me.

Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me. I see thermal data in rviz for both config_3 and config_4

@nkoenig
Copy link
Contributor

nkoenig commented Feb 11, 2021

The Fuel models have been updated to use:

      <sensor name="thermal_camera" type="thermal">
        <pose>0.435 -.01 0.125 0 0 0</pose>
        <camera name="thermal_camera">
          <horizontal_fov>0.4922</horizontal_fov>
          <lens>
            <intrinsics>
              <!-- fx = fy = width / ( 2 * tan (hfov / 2 ) ) -->
              <fx>764.35630</fx>
              <fy>764.35630</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>
            <format>L8</format>
          </image>
          <clip>
            <near>0.1</near>
            <far>100</far>
          </clip>
        </camera>
        <always_on>1</always_on>
        <update_rate>25</update_rate>
        <plugin
          filename="ignition-gazebo-thermal-sensor-system"
          name="ignition::gazebo::systems::ThermalSensor">
          <min_temp>253.15</min_temp>
          <max_temp>673.15</max_temp>
        </plugin>
      </sensor>

* adding thermal camera to cerberus m100

Signed-off-by: Ian Chen <[email protected]>

* fix bridge

Signed-off-by: Ian Chen <[email protected]>

* update thermal camera spec

Signed-off-by: Ian Chen <[email protected]>

* new config_2

Signed-off-by: Ian Chen <[email protected]>

* remove config_2

Signed-off-by: Ian Chen <[email protected]>

* reuse config_1 files

Signed-off-by: Ian Chen <[email protected]>
@osrf-jenkins
Copy link

Build finished. 21 tests run, 0 skipped, 1 failed.

@peci1
Copy link
Collaborator

peci1 commented Mar 15, 2021

The thermocam got lost from Fuel... #821.

@nkoenig nkoenig deleted the adlarkin/add_thermal_camera branch September 27, 2021 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants