33#include <VisionX/interface/components/Calibration.h>
34#include <VisionX/interface/core/DataTypes.h>
37#include <VirtualRobot/Robot.h>
38#include <VirtualRobot/Visualization/CoinVisualization/CoinVisualizationFactory.h>
43#include <ArmarXSimulation/interface/simulator/SimulatorInterface.h>
45#include <Calibration/StereoCalibration.h>
46#include <Image/ByteImage.h>
58 .setMatchRegex(
"\\d+(.\\d*)?")
63 visionx::ImageDimension(640, 480),
64 "Target resolution of the images. Captured images will be converted to this size.")
65 .setCaseInsensitive(
true)
66 .map(
"320x240", visionx::ImageDimension(320, 240))
67 .map(
"640x480", visionx::ImageDimension(640, 480))
68 .map(
"800x600", visionx::ImageDimension(800, 600))
69 .map(
"768x576", visionx::ImageDimension(768, 576))
70 .map(
"1024x768", visionx::ImageDimension(1024, 768))
71 .map(
"1280x960", visionx::ImageDimension(1280, 960))
72 .map(
"1600x1200", visionx::ImageDimension(1600, 1200))
73 .map(
"none", visionx::ImageDimension(0, 0));
78 "The coordinate system of the left camera");
81 "The coordinate system of the right camera");
85 "Camera calibration file, will be made available in the SLICE interface");
89 "Reference frame in the robot model of this stereo camera system.");
105 virtual public visionx::StereoCalibrationCaptureProviderInterface
111 return "DynamicSimulationImageProvider";
136 bool capture(
void** ppImageBuffers)
override;
144 visionx::StereoCalibration
153 std::string
getReferenceFrame(const ::Ice::Current& = Ice::emptyCurrent)
override;
165 props->defineOptionalProperty<
float>(
"focalLength", 600,
"The focal length.");
206 const std::string& cameraSensorNameLeft,
207 const std::string& cameraSensorNameRight);
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Image provider captures images from the simulator and broadcasts notifications at a specified frame r...
std::string rightNodeName
CByteImage ** resizedImages
VirtualRobot::RobotNodePtr cameraNodeL
visionx::StereoCalibration getStereoCalibration(const Ice::Current &c=Ice::emptyCurrent) override
Returns the StereoCalibration as provided in configuration.
bool setupCameraRendering(const std::string &robotName, const std::string &cameraSensorNameLeft, const std::string &cameraSensorNameRight)
VirtualRobot::RobotNodePtr cameraNodeR
std::optional< visionx::StereoCalibration > stereoCalibration
void onStartCapture(float frameRate) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
std::shared_ptr< SoOffscreenRenderer > rendererRight
bool getImagesAreUndistorted(const Ice::Current &c=Ice::emptyCurrent) override
Returns whether images are undistorted.
void onStopCapture() override
void onExitCapturingImageProvider() override
ArmarXPhysicsWorldVisualizationPtr simVisu
std::string getReferenceFrame(const ::Ice::Current &=Ice::emptyCurrent) override
void onInitCapturingImageProvider() override
bool updateCameraRendering()
std::shared_ptr< SoOffscreenRenderer > rendererLeft
std::string getDefaultName() const override
Retrieve default name of component.
ImageSequenceProviderDynamicSimulationPropertyDefinitions(std::string prefix)
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
The CapturingImageProvider provides a callback function to trigger the capturing of images with diffe...
float frameRate
Required frame rate.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< ArmarXPhysicsWorldVisualization > ArmarXPhysicsWorldVisualizationPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.