File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed 
nav2_docking/opennav_docking/src Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ geometry_msgs::msg::Twist Controller::computeRotateToHeadingCommand(
130130  const  geometry_msgs::msg::Twist & current_velocity,
131131  const  double  & dt)
132132{
133+   std::lock_guard<std::mutex> lock (dynamic_params_lock_);
134+ 
133135  geometry_msgs::msg::Twist cmd_vel;
134136  const  double  sign = angular_distance_to_heading > 0.0  ? 1.0  : -1.0 ;
135137  const  double  angular_vel = sign * rotate_to_heading_angular_vel_;
@@ -153,6 +155,8 @@ geometry_msgs::msg::Twist Controller::computeRotateToHeadingCommand(
153155bool  Controller::isTrajectoryCollisionFree (
154156  const  geometry_msgs::msg::Pose & target_pose, bool  is_docking, bool  backward)
155157{
158+   std::lock_guard<std::mutex> lock (dynamic_params_lock_);
159+ 
156160  //  Visualization of the trajectory
157161  nav_msgs::msg::Path trajectory;
158162  trajectory.header .frame_id  = base_frame_;
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments