Fixes float conversion in TM
This commit is contained in:
parent
79457a6e76
commit
7d91a14fae
|
@ -28,6 +28,7 @@ static const double DELTA_TIME_BETWEEN_DESTRUCTIONS = 10.0;
|
|||
} // namespace VehicleRemoval
|
||||
|
||||
namespace HybridMode {
|
||||
static const float HYBRID_MODE_DT_FL = 0.05f;
|
||||
static const double HYBRID_MODE_DT = 0.05;
|
||||
static const double INV_HYBRID_DT = 1.0 / HYBRID_MODE_DT;
|
||||
static const float PHYSICS_RADIUS = 50.0f;
|
||||
|
|
|
@ -12,6 +12,7 @@ using namespace constants::WaypointSelection;
|
|||
using namespace constants::SpeedThreshold;
|
||||
|
||||
using constants::HybridMode::HYBRID_MODE_DT;
|
||||
using constants::HybridMode::HYBRID_MODE_DT_FL;
|
||||
|
||||
MotionPlanStage::MotionPlanStage(
|
||||
const std::vector<ActorId> &vehicle_id_list,
|
||||
|
@ -147,7 +148,7 @@ void MotionPlanStage::Update(const unsigned long index) {
|
|||
if (!emergency_stop && (parameters.GetSynchronousMode() || elapsed_time > HYBRID_MODE_DT)) {
|
||||
|
||||
// Target displacement magnitude to achieve target velocity.
|
||||
const float target_displacement = dynamic_target_velocity * HYBRID_MODE_DT;
|
||||
const float target_displacement = dynamic_target_velocity * HYBRID_MODE_DT_FL;
|
||||
const SimpleWaypointPtr teleport_target_waypoint = GetTargetWaypoint(waypoint_buffer, target_displacement).first;
|
||||
|
||||
// Construct target transform to accurately achieve desired velocity.
|
||||
|
|
Loading…
Reference in New Issue