Commit 58a3fd69 authored by roangel's avatar roangel
Browse files

Added some changes to try downstairs: Scale factor 1.2, take into account...

Added some changes to try downstairs: Scale factor 1.2, take into account occluded flag in controller, Z origin is now 0, table, not middle of box
parent 4381a8fa
......@@ -14,8 +14,8 @@
using namespace d_fall_pps;
#endif
#define DRONE_HEIGHT 100 * FROM_MILIMETERS_TO_UNITS
#define DRONE_WIDTH 100 * FROM_MILIMETERS_TO_UNITS
#define DRONE_HEIGHT 100 * FROM_MILIMETERS_TO_UNITS * 1.2
#define DRONE_WIDTH 100 * FROM_MILIMETERS_TO_UNITS * 1.2
class crazyFly : public QGraphicsSvgItem
{
......
......@@ -102,7 +102,9 @@ void coordinatesToLocal(CrazyflieData& cf) {
AreaBounds area = context.localArea;
float originX = (area.xmin + area.xmax) / 2.0;
float originY = (area.ymin + area.ymax) / 2.0;
float originZ = (area.zmin + area.zmax) / 2.0;
// change Z origin to zero, i.e., to the table height, zero of global coordinates, instead of middle of the box
float originZ = 0.0;
// float originZ = (area.zmin + area.zmax) / 2.0;
cf.x -= originX;
cf.y -= originY;
......@@ -114,6 +116,8 @@ void viconCallback(const ViconData& viconData) {
for(std::vector<CrazyflieData>::const_iterator it = viconData.crazyflies.begin(); it != viconData.crazyflies.end(); ++it) {
CrazyflieData global = *it;
if(!global.occluded) //if it is not occluded, then proceed to compute the controller output
{
if(global.crazyflieName == context.crazyflieName) {
Controller controllerCall;
......@@ -160,6 +164,7 @@ void viconCallback(const ViconData& viconData) {
}
}
}
}
}
void loadParameters(ros::NodeHandle& nodeHandle) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment