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 footprint inflation for higher speeds #32

Merged
merged 10 commits into from
May 10, 2022
Merged

Conversation

mikeferguson
Copy link
Owner

No description provided.

}

ROS_ERROR("No pose in path was reachable");
// Really shouldn't hit this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is outside of a while(true) loop with no breaks... so it is impossible to get here

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but interestingly the compiler still insists I need a return value here... so I left the messages/comments as well

collision_points_->markers.resize(0);
}
// Get control and path, iteratively
while (true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a timeout just in case we don't hit any of the return conditions.

graceful_controller_ros/src/graceful_controller_ros.cpp Outdated Show resolved Hide resolved
geometry_msgs::PoseStamped robot_velocity;
odom_helper_.getRobotVel(robot_velocity);
max_vel_x = robot_velocity.pose.position.x + (acc_lim_x_ * acc_dt_);
max_vel_x = std::min(max_vel_x, max_vel_x_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line needed a few takes for me to see the underscore difference

if (!odom_helper_.getOdomTopic().empty())
// Iteratively try to find a path, incrementally reducing the velocity
double sim_velocity = max_vel_x;
do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I see a do-while :
image

// Configure controller max velocity
controller_->setVelocityLimits(min_vel_x_, sim_velocity, max_vel_theta_);
// Actually simulate our path
if (simulate(target_pose, cmd_vel))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering if simulate() should actually be get_cmd_vel()

return true;
}
// Reduce velocity and try again for same target_pose
sim_velocity -= scaling_step_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, so we start at the highest velocity, and keep iterating until we are under scaling_vel_x_? Why are we using scaling_vel_x_ here instead of just min_vel_x?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once you go below scaling_vel_x you are no longer shrinking the footprint (it's at scale = 1.0) - so if the path to the target_pose was blocked at the previous iteration, it will still be blocked at any lower velocity.

@mikeferguson mikeferguson merged commit a258179 into ros1 May 10, 2022
@mikeferguson mikeferguson deleted the inflate_footprint branch May 10, 2022 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants