Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a warning for TOTG if vel/accel limits aren't specified. #1186

Merged
merged 2 commits into from
Apr 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,12 @@ bool TimeOptimalTrajectoryGeneration::computeTimeStamps(robot_trajectory::RobotT
max_velocity[j] =
std::min(std::fabs(bounds.max_velocity_), std::fabs(bounds.min_velocity_)) * velocity_scaling_factor;
}
else
{
RCLCPP_WARN_STREAM_ONCE(
LOGGER, "Joint velocity limits are not defined. Using the default "
<< max_velocity[j] << " rad/s. You can define velocity limits in the URDF or joint_limits.yaml.");
}

max_acceleration[j] = 1.0;
if (bounds.acceleration_bounded_)
Expand All @@ -954,6 +960,13 @@ bool TimeOptimalTrajectoryGeneration::computeTimeStamps(robot_trajectory::RobotT
max_acceleration[j] = std::min(std::fabs(bounds.max_acceleration_), std::fabs(bounds.min_acceleration_)) *
acceleration_scaling_factor;
}
else
{
RCLCPP_WARN_STREAM_ONCE(LOGGER,
"Joint acceleration limits are not defined. Using the default "
<< max_acceleration[j]
<< " rad/s^2. You can define acceleration limits in the URDF or joint_limits.yaml.");
}
}

// Have to convert into Eigen data structs and remove repeated points
Expand Down