AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
LidarRayPatternHorizontalSweep.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16#pragma once
18
19namespace agxSensor
20{
27 {
28 public:
33
43 LidarRayPatternHorizontalSweep(const agx::Vec2& fov, const agx::Vec2& angleResolution, agx::Real frequency);
44
54 LidarRayPatternHorizontalSweep(const agx::Vec2& fov, const agx::Vec2u& resolution, agx::Real frequency);
55
65 const agx::RangeReal& horizontalFov, const agx::RangeReal& verticalFov, const agx::Vec2& angleResolution,
66 agx::Real frequency);
67
77 const agx::RangeReal& horizontalFov, const agx::RangeReal& verticalFov, const agx::Vec2u& resolution,
78 agx::Real frequency);
79
84
89
94
99
101
102 public:
103 virtual ~LidarRayPatternHorizontalSweep() = default;
104 virtual LidarRayPatternInterval getNextInterval(agx::Real dt) override;
105 virtual size_t getNumRays() const override;
106
107 virtual void synchronizeGraphics(RtSystemNodeProxy& node, const agxRender::RenderManager& renderManager) override;
108
110
112
113 private:
114 struct PatternState
115 {
116 agx::Real elapsedTime = 0.0;
117 agx::Real sweepTime = 0.0;
118 size_t last = std::numeric_limits<size_t>::max();
119 agx::RangeReal horizontalFov {0.0, 0.0};
120 agx::RangeReal verticalFov {0.0, 0.0};
121 agx::Vec2u resolution {0u, 0u};
122 };
123
124 private:
125 void setRays(
126 const agx::RangeReal& horizontalFov, const agx::RangeReal& verticalFov, const agx::Vec2u& resolution);
127
128 private:
129 PatternState m_state;
130 std::shared_ptr<LidarRayPatternStorage> m_pattern;
131 };
132}
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXSENSOR_EXPORT
Base of lidar ray pattern implementations responsible of providing a set of ray transforms (ray along...
Horizontal sweep pattern generating transforms in a sweeping pattern given field of view and resoluti...
LidarRayPatternHorizontalSweep(const agx::Vec2 &fov, const agx::Vec2 &angleResolution, agx::Real frequency)
Construct given field of view fov (radians x and y, centered about the lidar x-axis),...
LidarRayPatternHorizontalSweep(const agx::Vec2 &fov, const agx::Vec2u &resolution, agx::Real frequency)
Construct given field of view fov (radians x and y, centered about the lidar x-axis),...
LidarRayPatternHorizontalSweep(const agx::RangeReal &horizontalFov, const agx::RangeReal &verticalFov, const agx::Vec2 &angleResolution, agx::Real frequency)
Construct given field of view horizontal and vertical fov (radians start and stop),...
LidarRayPatternHorizontalSweep()
Default constructor, zero rays.
LidarRayPatternHorizontalSweep(const agx::RangeReal &horizontalFov, const agx::RangeReal &verticalFov, const agx::Vec2u &resolution, agx::Real frequency)
Construct given field of view horizontal and vertical fov (radians start and stop),...
Raytrace system node acting as a clone of model specific implementations.
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
Namespace containing classes for handling debug rendering of collision geometries,...
Definition: Constraint.h:36
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:41
Ray pattern interval (index range) with a start index and size.