]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/eb2008/movehelper_eb2008.cc
robofsm: Fixed robot_move_by
[eurobot/public.git] / src / robofsm / eb2008 / movehelper_eb2008.cc
index 547061d7d93befa21942bb9368f2770774159b53..718e90bd0736b6200fb9301987d3a79ce927b8b0 100644 (file)
@@ -221,6 +221,7 @@ void robot_move_by(double distance, struct final_heading *heading, struct Trajec
        y += distance*sin(phi);
 
        Trajectory *t;
+       if (!tc) tc = &trajectoryConstraintsDefault;
        bool backward = distance < 0;
        t = new Trajectory(*tc, backward);
        t->addPoint(x, y);