Updated docs and CHANGELOG.
This commit is contained in:
parent
cd277af189
commit
827368588d
|
@ -8,6 +8,11 @@
|
|||
* Fixed gravity measurement bug from IMU sensor
|
||||
* OpenDRIVE ingestion bugfixes
|
||||
* Added Dynamic Vision Sensor (DVS) camera based on ESIM simulation http://rpg.ifi.uzh.ch/esim.html
|
||||
* Added API functions `get_right_vector` and `get_up_vector`
|
||||
* Added parameter to enable/disable pedestrian navigation in standalone mode
|
||||
* Improved mesh split in standalone mode
|
||||
* Fixed large RAM usage when loading polinomial geometry from OpenDRIVE
|
||||
|
||||
|
||||
## CARLA 0.9.9
|
||||
|
||||
|
|
|
@ -1382,6 +1382,8 @@ Additional with applied junction lanes. Complex situations tend to occur at junc
|
|||
If __True__, the mesh at junctions will be smoothed to prevent issues where roads blocked other roads. __Default is `True`__.
|
||||
- <a name="carla.OpendriveGenerationParameters.enable_mesh_visibility"></a>**<font color="#f8805a">enable_mesh_visibility</font>** (_bool_)
|
||||
If __True__, the road mesh will be rendered. Setting this to __False__ should reduce the rendering overhead. __Default is `True`__.
|
||||
- <a name="carla.OpendriveGenerationParameters.enable_pedestrian_navigation"></a>**<font color="#f8805a">enable_pedestrian_navigation</font>** (_bool_)
|
||||
If __True__, Pedestrian navigation will be enabled using Recast tool. For very large maps it is recomended to disable this option. __Default is `True`__.
|
||||
|
||||
---
|
||||
|
||||
|
@ -1451,6 +1453,12 @@ Degrees around the X-axis.
|
|||
<div style="padding-left:30px;margin-top:-25px"></div>- <a name="carla.Rotation.get_forward_vector"></a>**<font color="#7fb800">get_forward_vector</font>**(<font color="#00a6ed">**self**</font>)
|
||||
Computes the vector pointing forward according to the orientation of each axis.
|
||||
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
|
||||
- <a name="carla.Rotation.get_right_vector"></a>**<font color="#7fb800">get_right_vector</font>**(<font color="#00a6ed">**self**</font>)
|
||||
Computes the vector pointing to the right according to the orientation of each axis.
|
||||
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
|
||||
- <a name="carla.Rotation.get_up_vector"></a>**<font color="#7fb800">get_up_vector</font>**(<font color="#00a6ed">**self**</font>)
|
||||
Computes the vector pointing upwards according to the orientation of each axis.
|
||||
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
|
||||
|
||||
<h5 style="margin-top: -20px">Dunder methods</h5>
|
||||
<div style="padding-left:30px;margin-top:-25px"></div>- <a name="carla.Rotation.__eq__"></a>**<font color="#7fb800">\__eq__</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**other**=[carla.Rotation](#carla.Rotation)</font>)
|
||||
|
@ -1878,6 +1886,12 @@ Translates a 3D point from global to local coordinates using the current transfo
|
|||
<div style="padding-left:30px;margin-top:-25px"></div>- <a name="carla.Transform.get_forward_vector"></a>**<font color="#7fb800">get_forward_vector</font>**(<font color="#00a6ed">**self**</font>)
|
||||
Computes a forward vector using its rotation.
|
||||
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
|
||||
- <a name="carla.Transform.get_right_vector"></a>**<font color="#7fb800">get_right_vector</font>**(<font color="#00a6ed">**self**</font>)
|
||||
Computes a right vector using its rotation.
|
||||
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
|
||||
- <a name="carla.Transform.get_up_vector"></a>**<font color="#7fb800">get_up_vector</font>**(<font color="#00a6ed">**self**</font>)
|
||||
Computes an up vector using its rotation.
|
||||
- **Return:** _[carla.Vector3D](#carla.Vector3D)_
|
||||
|
||||
<h5 style="margin-top: -20px">Dunder methods</h5>
|
||||
<div style="padding-left:30px;margin-top:-25px"></div>- <a name="carla.Transform.__eq__"></a>**<font color="#7fb800">\__eq__</font>**(<font color="#00a6ed">**self**</font>, <font color="#00a6ed">**other**=[carla.Transform](#carla.Transform)</font>)
|
||||
|
|
|
@ -135,6 +135,19 @@ namespace geom {
|
|||
-cp * sr};
|
||||
}
|
||||
|
||||
Vector3D Math::GetUpVector(const Rotation &rotation) {
|
||||
const float cy = std::cos(ToRadians(rotation.yaw));
|
||||
const float sy = std::sin(ToRadians(rotation.yaw));
|
||||
const float cr = std::cos(ToRadians(rotation.roll));
|
||||
const float sr = std::sin(ToRadians(rotation.roll));
|
||||
const float cp = std::cos(ToRadians(rotation.pitch));
|
||||
const float sp = std::sin(ToRadians(rotation.pitch));
|
||||
return {
|
||||
-cy * sp * cr - sy * sr,
|
||||
-sy * sp * cr + cy * sr,
|
||||
-cp * cr};
|
||||
}
|
||||
|
||||
std::vector<int> Math::GenerateRange(int a, int b) {
|
||||
std::vector<int> result;
|
||||
if (a < b) {
|
||||
|
|
|
@ -113,6 +113,9 @@ namespace geom {
|
|||
/// Compute the unit vector pointing towards the Y-axis of @a rotation.
|
||||
static Vector3D GetRightVector(const Rotation &rotation);
|
||||
|
||||
/// Compute the unit vector pointing towards the Y-axis of @a rotation.
|
||||
static Vector3D GetUpVector(const Rotation &rotation);
|
||||
|
||||
// Helper function to generate a vector of consecutive integers from a to b
|
||||
static std::vector<int> GenerateRange(int a, int b);
|
||||
|
||||
|
|
|
@ -55,6 +55,10 @@ namespace geom {
|
|||
return Math::GetRightVector(*this);
|
||||
}
|
||||
|
||||
Vector3D GetUpVector() const {
|
||||
return Math::GetUpVector(*this);
|
||||
}
|
||||
|
||||
void RotateVector(Vector3D &in_point) const {
|
||||
// Rotates Rz(yaw) * Ry(pitch) * Rx(roll) = first x, then y, then z.
|
||||
const float cy = std::cos(Math::ToRadians(yaw));
|
||||
|
|
|
@ -57,6 +57,10 @@ namespace geom {
|
|||
return rotation.GetRightVector();
|
||||
}
|
||||
|
||||
Vector3D GetUpVector() const {
|
||||
return rotation.GetUpVector();
|
||||
}
|
||||
|
||||
/// Applies this transformation to @a in_point (first translation then rotation).
|
||||
void TransformPoint(Vector3D &in_point) const {
|
||||
auto out_point = in_point;
|
||||
|
|
|
@ -155,6 +155,8 @@ void export_geom() {
|
|||
.def_readwrite("yaw", &cg::Rotation::yaw)
|
||||
.def_readwrite("roll", &cg::Rotation::roll)
|
||||
.def("get_forward_vector", &cg::Rotation::GetForwardVector)
|
||||
.def("get_right_vector", &cg::Rotation::GetRightVector)
|
||||
.def("get_up_vector", &cg::Rotation::GetUpVector)
|
||||
.def("__eq__", &cg::Rotation::operator==)
|
||||
.def("__ne__", &cg::Rotation::operator!=)
|
||||
.def(self_ns::str(self_ns::self))
|
||||
|
@ -171,6 +173,8 @@ void export_geom() {
|
|||
return location;
|
||||
}, arg("in_point"))
|
||||
.def("get_forward_vector", &cg::Transform::GetForwardVector)
|
||||
.def("get_right_vector", &cg::Transform::GetRightVector)
|
||||
.def("get_up_vector", &cg::Transform::GetUpVector)
|
||||
.def("__eq__", &cg::Transform::operator==)
|
||||
.def("__ne__", &cg::Transform::operator!=)
|
||||
.def(self_ns::str(self_ns::self))
|
||||
|
|
|
@ -453,3 +453,7 @@
|
|||
type: bool
|
||||
doc: >
|
||||
If __True__, the road mesh will be rendered. Setting this to __False__ should reduce the rendering overhead. __Default is `True`__.
|
||||
- var_name: enable_pedestrian_navigation
|
||||
type: bool
|
||||
doc: >
|
||||
If __True__, Pedestrian navigation will be enabled using Recast tool. For very large maps it is recomended to disable this option. __Default is `True`__.
|
||||
|
|
|
@ -255,6 +255,18 @@
|
|||
doc: >
|
||||
Computes the vector pointing forward according to the orientation of each axis.
|
||||
# --------------------------------------
|
||||
- def_name: get_right_vector
|
||||
params:
|
||||
return: carla.Vector3D
|
||||
doc: >
|
||||
Computes the vector pointing to the right according to the orientation of each axis.
|
||||
# --------------------------------------
|
||||
- def_name: get_up_vector
|
||||
params:
|
||||
return: carla.Vector3D
|
||||
doc: >
|
||||
Computes the vector pointing upwards according to the orientation of each axis.
|
||||
# --------------------------------------
|
||||
- def_name: __eq__
|
||||
return: bool
|
||||
params:
|
||||
|
@ -313,6 +325,16 @@
|
|||
doc: >
|
||||
Computes a forward vector using its rotation.
|
||||
# --------------------------------------
|
||||
- def_name: get_right_vector
|
||||
return: carla.Vector3D
|
||||
doc: >
|
||||
Computes a right vector using its rotation.
|
||||
# --------------------------------------
|
||||
- def_name: get_up_vector
|
||||
return: carla.Vector3D
|
||||
doc: >
|
||||
Computes an up vector using its rotation.
|
||||
# --------------------------------------
|
||||
- def_name: __eq__
|
||||
return: bool
|
||||
params:
|
||||
|
|
Loading…
Reference in New Issue