I am trying to change the bounding box of the foot bot.
I found several bounding box generating functions and changed the bounding box there (tried realistic and also very large bounding boxes) but nothing changed.
Of course, I recompiled and reinstalled everything all the time and changes on the robots visual form were also correctly displayed, but the bounding box always stayed the same.
It would be great if someone could point me to the right function to change.
These are the changes I tried:
Code: Select all
diff --git a/src/plugins/robots/foot-bot/simulator/dynamics2d_footbot_model.cpp b/src/plugins/robots/foot-bot/simulator/dynamics2d_foo
tbot_model.cpp
index 5cc8392..7d27478 100644
--- a/src/plugins/robots/foot-bot/simulator/dynamics2d_footbot_model.cpp
+++ b/src/plugins/robots/foot-bot/simulator/dynamics2d_footbot_model.cpp
@@ -200,11 +200,11 @@ namespace argos {
/****************************************/
void CDynamics2DFootBotModel::CalculateBoundingBox() {
- GetBoundingBox().MinCorner.SetX(m_ptBaseShape->bb.l);
+ GetBoundingBox().MinCorner.SetX(m_ptBaseShape->bb.l-10.5);
GetBoundingBox().MinCorner.SetY(m_ptBaseShape->bb.b);
GetBoundingBox().MinCorner.SetZ(GetDynamics2DEngine().GetElevation());
- GetBoundingBox().MaxCorner.SetX(m_ptBaseShape->bb.r);
- GetBoundingBox().MaxCorner.SetY(m_ptBaseShape->bb.t);
+ GetBoundingBox().MaxCorner.SetX(m_ptBaseShape->bb.r+10.0);
+ GetBoundingBox().MaxCorner.SetY(m_ptBaseShape->bb.t+10.0);
GetBoundingBox().MaxCorner.SetZ(GetDynamics2DEngine().GetElevation() + FOOTBOT_HEIGHT);
}
diff --git a/src/plugins/robots/foot-bot/simulator/pointmass3d_footbot_model.cpp b/src/plugins/robots/foot-bot/simulator/pointmass3d_f
ootbot_model.cpp
index 4987e5e..5a8ff28 100644
+++ b/src/plugins/robots/foot-bot/simulator/pointmass3d_footbot_model.cpp
@@ -67,12 +67,12 @@
GetBoundingBox().MinCorner.Set(
- GetEmbodiedEntity().GetOriginAnchor().Position.GetY() - FOOTBOT_RADIUS,
+ GetEmbodiedEntity().GetOriginAnchor().Position.GetY() - FOOTBOT_RADIUS-10,
GetEmbodiedEntity().GetOriginAnchor().Position.GetZ());
GetBoundingBox().MaxCorner.Set(
- GetEmbodiedEntity().GetOriginAnchor().Position.GetX() + FOOTBOT_RADIUS,
- GetEmbodiedEntity().GetOriginAnchor().Position.GetY() + FOOTBOT_RADIUS,
+ GetEmbodiedEntity().GetOriginAnchor().Position.GetX() + FOOTBOT_RADIUS+10,
+ GetEmbodiedEntity().GetOriginAnchor().Position.GetY() + FOOTBOT_RADIUS+10,
GetEmbodiedEntity().GetOriginAnchor().Position.GetZ() + FOOTBOT_HEIGHT);
}
Andreas