Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Endoscope rod help
#1
Simulating Endoscope Tip Articulation with Obi Rod - Seeking Implementation Advice  

I'm developing an endoscopy training simulator and need to simulate a flexible endoscope using Obi Rod (due to the torsion support) that interacts with an organ Obi Softbody. I'm looking for guidance on the best approach to implement the endoscope.

Real endoscope Behavior

An endoscope consists of:
Flexible insertion tube (~160-180cm): Can be pushed, pulled, and rotated along its axis
Articulated tip section (~10-15cm): The distal end that can bend up to 180° in four directions (up/down/left/right) using control knobs at the handle
Key characteristic: The tip bending is mechanically isolated from the main shaft via internal pull-wires. When you deflect the tip, it doesn't create relevant opposing forces in the insertion tube body.

What I Need to Achieve



1. Independent Tip Deflection
- The tip section (last 10-15cm) needs to bend smoothly and progressively in response to user input, creating a U shape where the tip points back towards the endoscope shaft
This bending should NOT propagate forces backward into the main insertion tube. I've done some tests changing particle velocities to shape the tip, and due to the constraints, the rest of the shaft ends up moving while bending its tip.
The tip can be undergoing a tip deflection while the entire scope is simultaneously being pushed/pulled/rotated, as the endoscope may be moving while the tip is being deflected or held while keeping a specific deflection value. Due to this, freezing the particles to avoid force propagation is not an option, as the endoscope still needs to moove freely.

2. Physical Connection
- Despite the mechanical isolation of the articulation mechanism, the tip is physically part of the same tube
- The tip must follow when the body is moved (pushed, pulled, or navigating through the organ)
- Both sections should interact with the environment (organ walls) naturally, which is a Obi Softbody with surface collisions

3. Roll/Twist Propagation
- When the insertion tube is rotated/twisted at the handle, this rotation should propagate all the way through to the tip, which already happens thanks to rod behaviour.
- This is separate from the tip deflection - the tip can be both deflected AND rotated

Questions for the Community

Main Question
What's the best approach in Obi to implement this articulated structure where the tip can deflect independently without forces propagating to the body? I've done several test and thought of several implementations

**Option A**: Single Obi Rod
- Modify particle velocities/positions for just the tip section
- Somehow prevent forces from propagating to the rest of the rod
- How would I achieve force isolation in this case?

**Option B**: Two Separate Obi Rods
- Body rod + Tip rod connected via ObiStitcher (or other method). Attachments seem too rigid for my needs.
- Apply deflection forces only to the tip rod, and propagate roll from body to tip rod manually?
- Does stitching provide any means for force isolation, or do forces still propagate?

**Option C**: Different approach entirely?
- Is there a better way to handle this in Obi that I'm not considering?
- Custom constraints? Different actor types?

Any advice on architecture, implementation approaches, or Obi best practices for this type of articulated simulation would be greatly appreciated!  Gran sonrisa Gran sonrisa

Thanks!
Reply
#2
(08-11-2025, 05:21 PM)Raidan Wrote: Key characteristic: The tip bending is mechanically isolated from the main shaft via internal pull-wires. When you deflect the tip, it doesn't create relevant opposing forces in the insertion tube body.

What's the best approach in Obi to implement this articulated structure where the tip can deflect independently without forces propagating to the body? I've done several test and thought of several implementations

Under normal circumstances, what you're asking for is physically impossible: If body A applies a force on body B, B applies a force of the same magnitude but opposite direction on A. This is Newton's third law of motion.

I'm not familiar with how endoscopes work, but if they have internal mechanisms to compensate/absorb the force that deflecting their tip causes on the main body of the endoscope, Obi does not implement anything remotely similar to this which means you'll need to modify the engine to achieve your goal.

(08-11-2025, 05:21 PM)Raidan Wrote: - Modify particle velocities/positions for just the tip section

This wouldn't result in persistent deformation of the rod, unless you calculated and applied velocity and position deltas yourself every constraint projection iteration. So, this would effectively be the same thing as building an entirely custom constraint type.

(08-11-2025, 05:21 PM)Raidan Wrote: - Body rod + Tip rod connected via ObiStitcher (or other method). Attachments seem too rigid for my needs.

Attachments are only as rigid as you want them to be: you can manually set their compliance (inverse stiffness).

(08-11-2025, 05:21 PM)Raidan Wrote: - Somehow prevent forces from propagating to the rest of the rod
- How would I achieve force isolation in this case?
- Does stitching provide any means for force isolation, or do forces still propagate?

There's no such thing as "force isolation" in conventional physics engines. There may be mechanisms to accomplish something similar in robotics or specialized industrial areas that use clever mechanical actuators, but I'm not familiar with them.

In any case, here's my proposed plan for implementing this: Rods are built of stretch/shear and bend/twist constraints. The former keep the rod's length, while the latter keep its shape. Bend/twist constraints have a "rest" shape, expressed as a Darboux vector. You can modify this vector to force the rod to bend, so pick the bend/twist constraint at the location where you want the rod to bend and set its rest Darboux vector to the desired value.

Doing this requires some knowledge of Obi's constraints architecture. See the ObiBone component (specifically, its UpdateRestShape() method) as an example of a custom actor type that modifies bend/twist rest Darboux vectors, in this case to follow the shape of an animated joint hierarchy.

Once you can control how the rod bends, achieving "force isolation" would require calculating the reaction force generated by the bend/twist constraint between the "tip" and the "body" on the body of the endoscope and then applying the same force multiplied by -1 to the body. This requires familiarity with position-based dynamics (specifically, position and orientation based Cosserat rods) which is the simulation paradigm upon which Obi is built.

kind regards,
Reply
#3
Hello Raidan,

Funny enough, I'm developing the same thing for work (specifically in the veterinary domain).

Following JoseMendez advices and an older post (https://obi.virtualmethodstudio.com/foru...-2905.html) where he implement some way to drive the rod (https://www.youtube.com/watch?v=wMZC38INjG4), I was able to have a first convincing model for endoscope simulation.

I am now investigating camera and light binding at the endoscope tip, parameters refining and moving toward soft-body organ (or at least deformable mesh).
Not quite sure if ObiSoftBody would handle hollow mesh for what we need, though.

Anyway, if you want to discuss this, I'd be happy to help.

Regards,

Reply