Skip to content

Commit

Permalink
Fix stamp
Browse files Browse the repository at this point in the history
  • Loading branch information
at-wat committed Mar 22, 2024
1 parent a9ffd39 commit 79b575b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/src/joint_trajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ TEST(JointTrajectory, CommandValidation)

// Publish valid command
trajectory_msgs::JointTrajectory cmd;
cmd.header.stamp = clock.clock;
cmd.header.stamp = ros::Time::now();
cmd.joint_names.resize(1);
cmd.joint_names[0] = "joint0";
cmd.points.resize(1);
Expand All @@ -91,7 +91,7 @@ TEST(JointTrajectory, CommandValidation)
<< "Valid joint_trajectory must not be ignored";

// Stop
cmd.header.stamp = clock.clock;
cmd.header.stamp = ros::Time::now();
cmd.points[0].positions[0] = 0.0;
cmd.points[0].velocities[0] = 0.0;
pub_cmd.publish(cmd);
Expand All @@ -105,7 +105,7 @@ TEST(JointTrajectory, CommandValidation)
<< "Valid joint_trajectory must not be ignored";

// Publish outdated command
cmd.header.stamp = clock.clock - ros::Duration(2.0);
cmd.header.stamp = ros::Time::now() - ros::Duration(2.0);
cmd.points[0].positions[0] = 1.0;
cmd.points[0].velocities[0] = 1.0;
pub_cmd.publish(cmd);
Expand Down

0 comments on commit 79b575b

Please sign in to comment.