Godot Version
4.2
Question
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!