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

Question about obstacle avoidance

asked 2023-08-08 15:36:55 -0600

Abhinav Sagar gravatar image

Hi, I don't know if this is the correct place to ask so please excuse me if it is not. Nav2 automatically avoids obstacles. My goal is to make it work such that it avoids all obstacles except one like a person's face. I would like the robot to goal to that obstacle and stop at some threshold distance rather than avoid it. It would be great if anyone can guide me on how to solve this task.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-08-10 18:22:41 -0600

Vini71 gravatar image

Hi I summary of the idea

1 -Face Recognition:

Use the ROS2 package for face recognition. https://www.theconstructsim.com/robot... This package will detect faces in the robot's field of view and provide coordinates of the detected face.

2-Determine Distance:

Once a face is detected, determine the distance between the robot and the face. This can be done using depth sensors or stereo cameras.

3- Send Boolean to cmd_vel:

If a face is detected and it's within a certain threshold distance, send a boolean signal to the robot's velocity controller (cmd_vel). This signal will instruct the robot to start slowing down.

4- Brake Mechanism:

As the robot approaches the face, continuously monitor the distance. Reduce the robot's velocity proportionally as it gets closer to the face. Once the robot is within the close distance threshold, bring the robot to a complete stop.

5- Integration with Nav2:

Modify the Nav2 parameters to avoid all obstacles except for the detected face. This can be achieved by setting higher costs for all obstacles in the costmap except for the detected face.

6- Safety Mechanisms:

Implement safety mechanisms to ensure that the robot doesn't collide with the person if face detection fails or if there are any other unforeseen issues. Flowchart:

Here's a flowchart to visualize the process:

https://showme.redstarplugin.com/d/PX...

edit flag offensive delete link more

Comments

Even easier hack around: Find pose of person who's face you want to find -> position of person +(1,0,0) (or x,y,z) pose 1 meter in front of this person's pose -> send goal of calculated goal to nav2 (and additional calculation to determine which way the robot should face, can be completed with some simple tf2 implementation)

chased11 gravatar image chased11  ( 2023-08-10 21:01:57 -0600 )edit

Question Tools

Stats

Asked: 2023-08-08 15:36:55 -0600

Seen: 659 times

Last updated: Aug 10 '23