Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
Signed-off-by: AmrElsersy <[email protected]>
  • Loading branch information
AmrElsersy committed Aug 6, 2021
1 parent 1059bdc commit 0311790
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions include/ignition/sensors/SegmentationCameraSensor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#ifndef IGNITION_SENSORS_SEGMENTATIONCAMERASENSOR_HH_
#define IGNITION_SENSORS_SEGMENTATIONCAMERASENSOR_HH_

#include <string>
#include <memory>
#include <string>

#include <ignition/common/Event.hh>
#include <ignition/common/PluginMacros.hh>
Expand Down Expand Up @@ -83,7 +83,7 @@ namespace ignition

/// \brief Get the rendering segmentation camera
/// \return Segmentation camera pointer
public: virtual rendering::SegmentationCameraPtr SegmentationCamera();
public: virtual rendering::SegmentationCameraPtr SegmentationCamera() const;

/// \brief Segmentation data callback used to get the data from the sensor
/// \param[in] _data pointer to the data from the sensor
Expand Down
10 changes: 5 additions & 5 deletions src/SegmentationCameraSensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*
*/

#include <mutex>
#include <memory>
#include <mutex>

#include <ignition/common/Console.hh>
#include <ignition/common/Image.hh>
Expand All @@ -41,9 +41,8 @@ class ignition::sensors::SegmentationCameraSensorPrivate
/// \param[in] _width width of image in pixels
/// \param[in] _height height of image in pixels
/// \return True if the image was saved successfully. False can mean
/// that the path provided to the constructor does exist and creation
/// that the image save path does not exist and creation
/// of the path was not possible.
/// \sa ImageSaver
public: bool SaveImage(const uint8_t *_coloredBuffer,
const uint8_t *_labelsBuffer, unsigned int _width, unsigned int _height);

Expand Down Expand Up @@ -188,8 +187,8 @@ bool SegmentationCameraSensor::Load(const sdf::Sensor &_sdf)
this->dataPtr->type = rendering::SegmentationType::PANOPTIC;
else
{
igndbg << "Wrong type {" << type <<
"}, type should be semantic or instance or panoptic" << std::endl;
igndbg << "Wrong type [" << type <<
"], type should be semantic or instance or panoptic" << std::endl;
return false;
}
}
Expand Down Expand Up @@ -327,6 +326,7 @@ bool SegmentationCameraSensor::CreateCamera()

/////////////////////////////////////////////////
rendering::SegmentationCameraPtr SegmentationCameraSensor::SegmentationCamera()
const
{
return this->dataPtr->camera;
}
Expand Down
6 changes: 3 additions & 3 deletions test/integration/segmentation_camera_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ uint8_t *g_buffer = nullptr;
/// \brief counter of received segmentation msgs
unsigned int g_counter = 0;

/// \brief Label of the hidden box
/// \brief Label of the boxes in the scene
const uint8_t hiddenLabel = 4;
const uint8_t leftBoxLabel = 1;
const uint8_t rightBoxLabel = 1;
Expand Down Expand Up @@ -223,8 +223,8 @@ void SegmentationCameraSensorTest::ImagesWithBuiltinSDF(
ASSERT_NE(sensor, nullptr);
sensor->SetScene(scene);

EXPECT_EQ(width, (int)sensor->ImageWidth());
EXPECT_EQ(height, (int)sensor->ImageHeight());
EXPECT_EQ(width, static_cast<int>(sensor->ImageWidth()));
EXPECT_EQ(height, static_cast<int>(sensor->ImageHeight()));

auto camera = sensor->SegmentationCamera();
ASSERT_NE(camera, nullptr);
Expand Down

0 comments on commit 0311790

Please sign in to comment.