We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36487d1 commit fe3a090Copy full SHA for fe3a090
moveit_core/trajectory_processing/src/trajectory_tools.cpp
@@ -87,7 +87,7 @@ trajectory_msgs::msg::JointTrajectory createTrajectoryMessage(const std::vector<
87
}
88
trajectory_msg.joint_names = joint_names;
89
const double time_step = 1.0 / static_cast<double>(sampling_rate);
90
- const int n_samples = static_cast<int>(trajectory.getDuration() / time_step) + 1;
+ const int n_samples = static_cast<int>(std::ceil(trajectory.getDuration() / time_step)) + 1;
91
trajectory_msg.points.reserve(n_samples);
92
for (int sample = 0; sample < n_samples; ++sample)
93
{
0 commit comments