Skip to content

Commit

Permalink
issue cam2-auto-drone#2 trial_1 rovers eliptic movement on a straight…
Browse files Browse the repository at this point in the history
… road
  • Loading branch information
Qubi0-0 committed Dec 22, 2021
1 parent 3497b2c commit 5dc12a5
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion trial_1_setup/animated_box.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace gazebo
// name the animation "test",
// make it last 10 seconds,
// and set it on a repeat loop
new gazebo::common::PoseAnimation("test", 35, true));
new gazebo::common::PoseAnimation("test", 71, true));

gazebo::common::PoseKeyFrame *key;

Expand All @@ -52,6 +52,30 @@ namespace gazebo
key->Translation(ignition::math::Vector3d(8, 0, 0.05));
key->Rotation(ignition::math::Quaterniond(0, 0, 0));

key = anim->CreateKeyFrame(33.0);
key->Translation(ignition::math::Vector3d(9, 0.5, 0.05));
key->Rotation(ignition::math::Quaterniond(0, 0, 1.57));

key = anim->CreateKeyFrame(36.0);
key->Translation(ignition::math::Vector3d(8, 1, 0.05));
key->Rotation(ignition::math::Quaterniond(0, 0, 3.14));

key = anim->CreateKeyFrame(45.0);
key->Translation(ignition::math::Vector3d(0, 1, 0.05));
key->Rotation(ignition::math::Quaterniond(0, 0, 3.14));

key = anim->CreateKeyFrame(65.0);
key->Translation(ignition::math::Vector3d(-8, 1, 0.05));
key->Rotation(ignition::math::Quaterniond(0, 0, 3.14));

key = anim->CreateKeyFrame(68.0);
key->Translation(ignition::math::Vector3d(-9, 0.5, 0.05));
key->Rotation(ignition::math::Quaterniond(0, 0, 4.71));

key = anim->CreateKeyFrame(71);
key->Translation(ignition::math::Vector3d(-8, 0, 0.05));
key->Rotation(ignition::math::Quaterniond(0, 0, 6.28));

// set the animation
_parent->SetAnimation(anim);
}
Expand Down

0 comments on commit 5dc12a5

Please sign in to comment.