Ask Your Question

whether to use SMACH or not for pick_and_place and door_opening

asked 2020-10-09 04:04:56 -0500

xibeisiber gravatar image

Hi all,

I want to achieve the pick&place and door opening function for my robot. Currently I wrote a single node for pick&place, with the approaching, grasping, retreating, placing stages being executed sequentially. I intended to implement the door opening in the same way.

Before that I checked the pr2 package, the door opening package is acheived via the SMACH, different stages like door_detection, handle_detection, handle_grasping and so on are implemented as actions. Inside the actions the services like handle_detection may be called.

The SMACH can make the task clear at high level, but needs more work than a single node implementation. I'm wondering whether I should use the SMACH to achieve the pick&place and door_opening tasks. Also, the behavior tree is said to have more advantage for complex tasks than SMACH, but the behavior tree package seems outdated??

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-10-09 07:00:01 -0500

Rayman gravatar image

State machines and behavior trees are useful when you have a lot of failure conditions that you have to handle. For example, the opening of the door could fail in multiple ways: - door handle not detected - robot was not able to grasp the handle - robot was unable retreat arm - various lower level failures

Each failure could have a different behavior to solve the problem. For example when the door handle is not detected, you could reposition the robot. Or when the grasp failed, you could retry detecting and try again (for x times).

As you can image, if you don't use a framework for this, the code will be quite complex. State machines and behavior trees help to manage this complexity. They each have their own advantages and disadvantages.

edit flag offensive delete link more


Thanks very much for your helpful answer. I will try to learn how to use SMACH or behavior tree. I found several packages for these two: SMACH, SMACC, ROS-Behavior-Tree, pi_tree, py_tree, flexBE, BehaviorTree.CPP ..

xibeisiber gravatar image xibeisiber  ( 2020-10-09 19:54:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-10-09 04:04:56 -0500

Seen: 56 times

Last updated: Oct 09 '20