How would I build a realistic sim of a robot arm?

Godot Version



Hello! I have worked for years on my own engine to simulate robots that I build IRL.
The overhead is too high so I’m exploring using engines like Godot to lighten my workload.

Here’s the real arm on my desk…

(more in follow up posts)

So on the whole a good start. I hope you experts can point me in the right direction how to proceed.

The point of the app is to control a real arm. I make a simulated version of the arm that has the same physical properties: mass, joint limits, etc. Do you know how to make the joints very stiff to behave like the real thing? I experimented with stiffness, bias, softness, and relaxation. There are two “bias” here, now sure what either one does.

In my old app I could drive the arm with either Forward Kinematics (move joints) and Inverse Kinematics (move hand). In the godot I have a script on each HingeJoint3D that tries to move the motors.

extends HingeJoint3D
@export var keyForward:InputEvent
@export var keyBackward:InputEvent

var mv;

# Called when the node enters the scene tree for the first time.
func _ready():
	mv = get("motor/target_velocity");

func _input(event: InputEvent) -> void:
	if keyForward.as_text() == event.as_text():
		mv += 10
		print("forward ", get_parent_node_3d().name, "i", mv)
	if keyBackward.as_text() == event.as_text():
		mv -= 10
		print("backward ", get_parent_node_3d().name, "i", mv)

So far this runs but doesn’t apply force to the joints. Hint, please? At this stage I’m trying to get FK working. If you have ideas about how to plan ahead for IK, please share.

Thank you for reading. Happy coding!

And here’s some basic stuff I got working in Godot…

More Godot…

and here’s the old java app, Robot Overlord

Sounds to me like you probably need something dynamic that you can control by code, but figured I should mention this just in case…

If you don’t need dynamic control in your project, you can just model, rig, animate and import from Blender. Then play the animations as you need them.

I need dynamics because that’s a part of impedance control, an advanced feature that makes cobots responsive.

The tool I’m trying to build will allow users to create animations. You’re talking about playing pre-made animations. These are not the same.