GithubHelp home page GithubHelp logo

stepback_recovery's People

Contributors

zhoujoey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar Hsiao Ray avatar

Watchers

 avatar

stepback_recovery's Issues

你好,请教一下这部分代码实现的逻辑是什么

这个循环里面的sim_distsafty_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_distsafty_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 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.