class gazebo::CameraDataPackController

Overview

#include <camera_datapack_controller.h>

class CameraDataPackController: public JsonDataPackController {
public:
    // construction

    CameraDataPackController(
        const std::string& devName,
        const rendering::CameraPtr& camera,
        const sensors::SensorPtr& parent
    );

    // methods

    virtual void handleDataPackData(const nlohmann::json& data);
    virtual nlohmann::json* getDataPackInformation();

    void updateCamData(
        const unsigned char* image,
        unsigned int width,
        unsigned int height,
        unsigned int depth
    );

    void resetTime();
};

Inherited Members

public:
    // methods

    virtual DATA_TYPE* getDataPackInformation() = 0;
    virtual void handleDataPackData(const DATA_TYPE& data) = 0;
    const nlohmann::json& getEmptyDataPack() const;

Detailed Documentation

Methods

virtual void handleDataPackData(const nlohmann::json& data)

Handle received datapack data.

Parameters:

data

Data to be processed

virtual nlohmann::json* getDataPackInformation()

Get datapack information to be forwarded to the NRP.

Returns:

Returns a DATA_TYPE pointer containing requested data