Skip to content

Commit

Permalink
takeoff working with steppeble clock
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Aug 13, 2017
1 parent fa93242 commit 5cedfe4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class SimpleFlightDroneController : public DroneControllerBase {
Settings rc_settings;
simple_flight_settings.getChild("RC", rc_settings);
params_.rc.allow_api_when_disconnected =
simple_flight_settings.getBool("AllowAPIWhenDisconnected", false);
rc_settings.getBool("AllowAPIWhenDisconnected", false);

}

Expand Down
14 changes: 7 additions & 7 deletions AirLib/include/physics/FastPhysicsEngine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ class FastPhysicsEngine : public PhysicsEngineBase {
updateCollisonResponseInfo(collison_info, next, is_collison_response, collison_response_info);
}

Utils::log(Utils::stringf("T-VEL %s %" PRIu64 ": ",
VectorMath::toString(next.twist.linear).c_str(), clock()->getStepCount()));
//Utils::log(Utils::stringf("T-VEL %s %" PRIu64 ": ",
// VectorMath::toString(next.twist.linear).c_str(), clock()->getStepCount()));

body.setKinematics(next);
body.setWrench(next_wrench);
Expand Down Expand Up @@ -203,7 +203,7 @@ class FastPhysicsEngine : public PhysicsEngineBase {

next_wrench = Wrench::zero();

Utils::log(Utils::stringf("*** C-VEL %s: ", VectorMath::toString(next.twist.linear).c_str()));
//Utils::log(Utils::stringf("*** C-VEL %s: ", VectorMath::toString(next.twist.linear).c_str()));

return true;
}
Expand Down Expand Up @@ -310,8 +310,8 @@ class FastPhysicsEngine : public PhysicsEngineBase {

next_wrench = body_wrench + drag_wrench;

Utils::log(Utils::stringf("B-WRN %s: ", VectorMath::toString(body_wrench.force).c_str()));
Utils::log(Utils::stringf("D-WRN %s: ", VectorMath::toString(drag_wrench.force).c_str()));
//Utils::log(Utils::stringf("B-WRN %s: ", VectorMath::toString(body_wrench.force).c_str()));
//Utils::log(Utils::stringf("D-WRN %s: ", VectorMath::toString(drag_wrench.force).c_str()));

/************************* Update accelerations due to force and torque ************************/
//get new acceleration due to force - we'll use this acceleration in next time step
Expand Down Expand Up @@ -349,8 +349,8 @@ class FastPhysicsEngine : public PhysicsEngineBase {

computeNextPose(dt, current.pose, avg_linear, avg_angular, next);

Utils::log(Utils::stringf("N-VEL %s %f: ", VectorMath::toString(next.twist.linear).c_str(), dt));
Utils::log(Utils::stringf("N-POS %s %f: ", VectorMath::toString(next.pose.position).c_str(), dt));
//Utils::log(Utils::stringf("N-VEL %s %f: ", VectorMath::toString(next.twist.linear).c_str(), dt));
//Utils::log(Utils::stringf("N-POS %s %f: ", VectorMath::toString(next.pose.position).c_str(), dt));

}

Expand Down
2 changes: 1 addition & 1 deletion AirLib/src/controllers/DroneControllerBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ bool DroneControllerBase::moveOnPath(const vector<Vector3r>& path, float velocit
float error = (actual_vect - actual_on_goal).norm() * adaptive_lookahead;
if (error > lookahead_error) {
lookahead_error_increasing++;
if (lookahead_error_increasing > 100) {
if (lookahead_error_increasing > 1E5) {
throw std::runtime_error("lookahead error is continually increasing so we do not have safe control, aborting moveOnPath operation");
}
}
Expand Down
2 changes: 1 addition & 1 deletion Unreal/Plugins/AirSim/Source/MultiRotorConnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ float MultiRotorConnector::joyStickToRC(int16_t val)

void MultiRotorConnector::updateRenderedState()
{
Utils::log("------Render tick-------");
//Utils::log("------Render tick-------");

//move collison info from rendering engine to vehicle
const CollisionInfo& collision_info = vehicle_pawn_->getCollisonInfo();
Expand Down

0 comments on commit 5cedfe4

Please sign in to comment.