Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Apr 24, 2024
2 parents 0b786d7 + 52b0935 commit ec27e53
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package mvsim
^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.9.3 (2024-04-24)
------------------
* Fix usage of (new explicit) TPoint3D constructors
* Contributors: Jose Luis Blanco-Claraco

0.9.2 (2024-03-21)
------------------
* BUG FIX: 3D lidars should not 'see' XYZ corners of wheels
Expand Down
2 changes: 1 addition & 1 deletion modules/simulator/include/mvsim/mvsim_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// clang-format off
#define MVSIM_MAJOR_VERSION 0
#define MVSIM_MINOR_VERSION 9
#define MVSIM_PATCH_VERSION 2
#define MVSIM_PATCH_VERSION 3

#define MVSIM_STR_EXP(__A) #__A
#define MVSIM_STR(__A) MVSIM_STR_EXP(__A)
Expand Down
10 changes: 6 additions & 4 deletions modules/simulator/src/CollisionShapeCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,16 @@ Shape2p5 CollisionShapeCache::processGenericGeometry(
mrpt::math::TPoint2Df(coarseBB.min.x, coarseBB.min.y),
mrpt::math::TPoint2Df(coarseBB.max.x, coarseBB.max.y));

auto lambdaUpdatePt = [&](const mrpt::math::TPoint3Df& orgPt) {
auto lambdaUpdatePt = [&](const mrpt::math::TPoint3Df& orgPt)
{
numTotalPts++;
auto pt = modelPose.composePoint(orgPt * modelScale);
if (pt.z < zMin || pt.z > zMax) return; // skip
ret.buildAddPoint(pt);
numPassedPts++;
};
auto lambdaUpdateTri = [&](const mrpt::opengl::TTriangle& tri) {
auto lambdaUpdateTri = [&](const mrpt::opengl::TTriangle& tri)
{
numTotalPts += 3;
// transform the whole triangle, then compare with [z,z] limits:
mrpt::opengl::TTriangle t = tri;
Expand Down Expand Up @@ -324,8 +326,8 @@ Shape2p5 CollisionShapeCache::processCylinderLike(
for (size_t i = 0; i < nFaces; i++)
{
const double ang = i * 2 * M_PI / nFaces;
const mrpt::math::TPoint2D localPt = {
cos(ang) * actualRadius, sin(ang) * actualRadius};
const mrpt::math::TPoint3D localPt = {
cos(ang) * actualRadius, sin(ang) * actualRadius, .0};
const auto pt = modelPose.composePoint(localPt * modelScale);
contour.emplace_back(pt.x, pt.y);
}
Expand Down
3 changes: 2 additions & 1 deletion modules/simulator/src/World_walls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ void World::process_load_walls(const rapidxml::xml_node<char>& node)

// Transform them:
tfPts.reserve(segments.size());
for (const auto& pt : segments) tfPts.emplace_back(tf.composePoint(pt));
for (const auto& pt : segments)
tfPts.emplace_back(tf.composePoint(mrpt::math::TPoint3D(pt)));
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>A lightweight multivehicle simulation framework.</description>

<!-- All version numbers in CMake scripts are taken from this line: -->
<version>0.9.2</version>
<version>0.9.3</version>

<maintainer email="[email protected]">Jose-Luis Blanco-Claraco</maintainer>
<license>BSD</license>
Expand Down

0 comments on commit ec27e53

Please sign in to comment.