Module for processing geometry models using concepts from comp-rob2b and ones introduced for use by the SECORO group.
Classes:
-
FrameModel
–Model object for a Frame
-
PoseCoordModel
–Model object for a PoseCoordinate
-
PositionCoordModel
–Model object for a PoseCoordinate
Functions:
-
get_coord_vectorxyz
–Extract coordinates for a VectorXYZ model.
-
get_euler_angles_abg
–Extract coordinates for a AnglesAlphaBetaGamma model.
-
get_euler_angles_params
–Extract parameters for a EulerAngles model.
-
get_scipy_rotation
–Parse orientation coordinate in a graph into a SciPy Rotation.
FrameModel
FrameModel(frame_id, graph)
Bases: ModelBase
Model object for a Frame
Attributes:
-
origin
(URIRef
) –URI for origin Point of the Frame
Parameters:
Source code in src/rdf_utils/models/geometry.py
69 70 71 72 73 74 75 76 |
|
PoseCoordModel
PoseCoordModel(coord_id, graph)
Bases: ModelBase
Model object for a PoseCoordinate
Attributes:
-
pose
(URIRef
) –URI of Pose of the coordinate
-
of
(FrameModel
) –the pose's target frame
-
wrt
(FrameModel
) –the pose's reference frame
-
as_seen_by
(URIRef
) –the coordinate's reference frame
Parameters:
-
coord_id
(URIRef
) –URI of the PoseCoordinate in the graph
-
graph
(Graph
) –RDF graph for loading attributes
Source code in src/rdf_utils/models/geometry.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
PositionCoordModel
PositionCoordModel(coord_id, graph)
Bases: ModelBase
Model object for a PoseCoordinate
Attributes:
-
position
(URIRef
) –URI of Position of the coordinate
-
of
(URIRef
) –URI of the position's target Point
-
wrt
(URIRef
) –URI of the position's reference Point
-
as_seen_by
(URIRef
) –the coordinate's reference frame
Parameters:
-
coord_id
(URIRef
) –URI of the PositionCoordinate in the graph
-
graph
(Graph
) –RDF graph for loading attributes
Source code in src/rdf_utils/models/geometry.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
|
get_coord_vectorxyz
get_coord_vectorxyz(coord_model, graph)
Extract coordinates for a VectorXYZ model.
Parameters:
-
coord_model
(ModelBase
) –coordinate model object
-
graph
(Graph
) –RDF graph to look for coordinate attributes
Returns:
Source code in src/rdf_utils/models/geometry.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
get_euler_angles_abg
get_euler_angles_abg(coord_model, graph)
Extract coordinates for a AnglesAlphaBetaGamma model.
Parameters:
-
coord_model
(PoseCoordModel
) –coordinate model object, currently only handle PoseCoordModel
-
graph
(Graph
) –RDF graph to look for coordinate attributes
Returns:
-
str
–tuple containing:
-
bool
–- axes sequence of the Euler angles
-
URIRef
–- whether the rotation is intrinsic
-
tuple[float, float, float]
–- unit of the angle values (degrees or radians)
-
tuple[str, bool, URIRef, tuple[float, float, float]]
–- angle values
Source code in src/rdf_utils/models/geometry.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
|
get_euler_angles_params
get_euler_angles_params(coord_model, graph)
Extract parameters for a EulerAngles model.
Parameters:
-
coord_model
(PoseCoordModel
) –coordinate model object, currently only handle PoseCoordModel
-
graph
(Graph
) –RDF graph to look for coordinate attributes
Returns:
-
tuple[str, bool]
–tuple containing axes sequence of the Euler angles and whether the rotation is intrinsic
Source code in src/rdf_utils/models/geometry.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
|
get_scipy_rotation
get_scipy_rotation(coord_model, graph)
Parse orientation coordinate in a graph into a SciPy Rotation.
Handles and convert different orientation coordinate types into a SciPy Rotation
Parameters:
-
coord_model
(PoseCoordModel
) –coordinate model object, currently only handle PoseCoordModel
-
graph
(Graph
) –RDF graph to look for coordinate attributes
Returns:
-
Rotation
–Corresponding SciPy Rotation
Source code in src/rdf_utils/models/geometry.py
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
|