ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Smac Planner - Is it possible to make the robot Reverse (without changing heading)

asked 2021-04-05 07:13:44 -0600

kamakshi gravatar image

updated 2021-04-05 13:32:28 -0600

I have a Ackermann type robot (car) with turning radius 1. I was trying to tune smac planner (motion_model_for_search: "DUBIN") with RPP local planner. I am able to move the robot forward, but making it reverse isn't possible. Is it possible to make the robot move in reverse direction without changing its heading? If so can you please tell me which parameters allow me to do that.

I tried it with Redd_shepps too..

GridBased:
  plugin: "nav2_smac_planner/SmacPlanner"
  tolerance: 0.5 
  downsample_costmap: false    
  downsampling_factor: 1          
  allow_unknown: false     
  max_iterations: -1        
  max_on_approach_iterations: 1000 
  max_planning_time: 2.0        
  smooth_path: true   
  motion_model_for_search: "REEDS_SHEPP"
  angle_quantization_bins: 72    
  minimum_turning_radius: 1.5     
  reverse_penalty: 1.0  #For Reeds-Shepp model: penalty to apply if motion is reversing, must be => 1
  change_penalty: 0.20 #0.20       
  non_straight_penalty: 1.05        
  cost_penalty: 1.3           
  smoother:
    smoother:
      w_curve: 30.0 #1.0         
      w_dist: 0.0             
      w_smooth: 30000.0           
      w_cost: 1.0 #0.025           
      cost_scaling_factor: 10.0

However, when I created a new bt

    <root main_tree_to_execute="MainTree">
         <BehaviorTree ID="MainTree">
            <PipelineSequence name="NavigateWithReplanning">
               <DistanceController distance="1.0">
                      <ComputePathToPose goal="{goal}" path="{path}" planner_id="GridBased"/>
               </DistanceController>
               <FollowPath path="{path}"  controller_id="FollowPath"/>
                <Wait wait_duration="2"/>
                <BackUp backup_dist="2.0" backup_speed="1.0"/>
            </PipelineSequence>
         </BehaviorTree>
     </root>

And tried running the above config, because of backup recovery_server it starts to backup. Is backup plugin a must?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-04-05 12:11:44 -0600

updated 2021-04-05 12:12:17 -0600

The RPP does not currently support reversing, but there's no theoretical blockage from doing so. I'd be more than happy to discuss a contribution to enable that behavior!

The Smac planner can handle reversing using the Redds-Shepp motion model rather than Dubin.

edit flag offensive delete link more

Comments

I tried with that too. I have updated the question with more details.

kamakshi gravatar image kamakshi  ( 2021-04-05 13:28:06 -0600 )edit

Update: RPP does now support reversing

stevemacenski gravatar image stevemacenski  ( 2021-08-25 21:34:42 -0600 )edit
0

answered 2021-06-28 09:07:10 -0600

vinny gravatar image

The Wait and the BackUp nodes in your BT are recovery nodes rather than enabling backup in the smac_planner.

To answer your updated question, no you do not need the BackUp node in your BT unless you are wanting to BackUp for whatever reason after you FollowPath

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-04-05 07:13:44 -0600

Seen: 626 times

Last updated: Jun 28 '21