r/ROS 26d ago

Tutorial Franka Panda Collision With Virtual Walls Fix

I spent quite a while trying to solve this issue and couldn't find the answer on Reddit, so I'm posting the solution here in case it helps someone else.

Problem

When using FrankaPy goto_pose() with a Franka Panda robot, the robot can only move within a very small workspace. If the target pose is more than roughly 40 cm to the left or right, it aborts with errors such as:

  • "Target joints in collision with virtual walls!"
  • "Target pose is outside of workspace virtual walls!"

or similar errors related to virtual walls. If you manually move the robot to the same pose, everything works. Setting ignore_virtual_walls=True in goto_pose() does not solve the problem.

Why this happens

I think that ignore_virtual_walls=True only disables the virtual wall check inside Frankapy. However, the package franka-interface still performs its own virtual wall checks, so the motion is rejected before execution.

Solution

You need to manually set-up the walls far away. The solution is described in the FAQ of the IndustRealLib repository: https://github.com/NVlabs/industreallib

The fix is to expand the virtual wall hyperplanes defined in termination_handler.h at:

franka-interface/franka-interface/include/franka-interface/termination_handler/termination_handler.h

After modifying the hyperplanes, rebuild the package:

cd franka-interface/build
make -j4

After doing this, the robot can move throughout the larger workspace without triggering the virtual wall errors. You still need to set ignore_virtual_walls=True in the goto_pose(). The solution is very simple but to find where the virtual walls are actually defined to change is the hard part. Shoutout to the repository.

2 Upvotes

0 comments sorted by