zhoujoey / stepback_recovery Goto Github PK
View Code? Open in Web Editor NEWROS recovery behavior for robot to step_back meters.
ROS recovery behavior for robot to step_back meters.
这个循环里面的sim_dist
和safty_check_dist
具体是什么意思?还有这段while循环实现的逻辑我也不是很懂,求指教
while(sim_dist < safty_check_dist){
local_costmap_->getRobotPose(global_pose);
/*
//todo : get global pose back sim_dist of base_link
tf::TransformListener transform_listener;
try{
tf::Stamped<tf::Pose> global_pose;
tf::Stamped<tf::Pose> local_pose(tf::Pose(tf::Quaternion(0, 0, 0, 1), tf::Vector3(-1 * sim_dist, 0, 0.0)), ros::Time(0), "base_link");
transform_listener.transformPose ("map", local_pose, global_pose);
}catch (tf::TransformException ex){
ROS_ERROR("%s",ex.what());
ros::Duration(1.0).sleep();
}
*/
double x = global_pose.getOrigin().x()- sim_dist , y = global_pose.getOrigin().y();
double theta = tf::getYaw(global_pose.getRotation());
double footprint_cost = world_model_->footprintCost(x, y, theta, local_costmap_->getRobotFootprint(), 0.0, 0.0);
if(footprint_cost < 0.0){
geometry_msgs::Twist zero_vel;
vel_pub.publish(zero_vel);
r.sleep();
ROS_ERROR("Stepback recovery can't stepback because there is a potential collision. Cost: %.2f", footprint_cost);
return;
}
sim_dist += sim_step;
}```
这个循环里面的sim_dist
和safty_check_dist
具体是什么意思?还有这段while循环实现的逻辑我也不是很懂,求指教
while(sim_dist < safty_check_dist){
local_costmap_->getRobotPose(global_pose);
/*
//todo : get global pose back sim_dist of base_link
tf::TransformListener transform_listener;
try{
tf::Stamped<tf::Pose> global_pose;
tf::Stamped<tf::Pose> local_pose(tf::Pose(tf::Quaternion(0, 0, 0, 1), tf::Vector3(-1 * sim_dist, 0, 0.0)), ros::Time(0), "base_link");
transform_listener.transformPose ("map", local_pose, global_pose);
}catch (tf::TransformException ex){
ROS_ERROR("%s",ex.what());
ros::Duration(1.0).sleep();
}
*/
double x = global_pose.getOrigin().x()- sim_dist , y = global_pose.getOrigin().y();
double theta = tf::getYaw(global_pose.getRotation());
double footprint_cost = world_model_->footprintCost(x, y, theta, local_costmap_->getRobotFootprint(), 0.0, 0.0);
if(footprint_cost < 0.0){
geometry_msgs::Twist zero_vel;
vel_pub.publish(zero_vel);
r.sleep();
ROS_ERROR("Stepback recovery can't stepback because there is a potential collision. Cost: %.2f", footprint_cost);
return;
}
sim_dist += sim_step;
}``` @zhoujoey
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.