Setting individual joint position in IK mode

Typically: "How do I... ", "How can I... " questions
Post Reply
faisalkhan
Posts: 14
Joined: 19 Sep 2018, 15:53

Setting individual joint position in IK mode

Post by faisalkhan » 16 Nov 2018, 08:45

Can we set the joint position manually while joint is operated in IK Mode.

coppelia
Site Admin
Posts: 7450
Joined: 14 Dec 2012, 00:25

Re: Setting individual joint position in IK mode

Post by coppelia » 16 Nov 2018, 12:02

Yes, you can use sim.setJointPosition to create a temporary bias towards a configuration you wish (i.e. mainly makes sense with redundant manipulators, or manipulators that offer more than 1 configuration for a given end-effector pose). This works because the IK functionality always computes from the current manipulator configuration.

Cheers

faisalkhan
Posts: 14
Joined: 19 Sep 2018, 15:53

Re: Setting individual joint position in IK mode

Post by faisalkhan » 16 Nov 2018, 18:07

does it effect the other joint...i want to achieve passive mode behavior in inverse kinematic mode as i had gravity issue in passive mode.Currently working on Ant robot.

coppelia
Site Admin
Posts: 7450
Joined: 14 Dec 2012, 00:25

Re: Setting individual joint position in IK mode

Post by coppelia » 19 Nov 2018, 07:42

Oh, if you have dynamics turned on, this is a different story and not that easy.
What exactly is your problem with your current situation? Maybe you are searching in the wrong direction.
Best would be to post a simplified version of your scene so that we can have a look at it.

Cheers

faisalkhan
Posts: 14
Joined: 19 Sep 2018, 15:53

Re: Setting individual joint position in IK mode

Post by faisalkhan » 19 Nov 2018, 16:43

i want to apply the reinforcement learning technique for the project.the problem is we didn't require IK for training as we try to avoid it.But when set the joint in passive mod it drags downward ruin all our effort and algorithm.we need stabilize so it hold itself as we will be later shift this code to real robot.so we require access to the each and every joint and try to train our robot basis on the joint movement.at the end our robot will be able to move without human effort(hard coding).so we need stable robot.we don't have knowledge of PID value.plus i don't how to post scene here.

coppelia
Site Admin
Posts: 7450
Joined: 14 Dec 2012, 00:25

Re: Setting individual joint position in IK mode

Post by coppelia » 20 Nov 2018, 07:08

So you basically do not want to use IK at all. You just want to be able to control your joints in position mode, with dynamics enabled?
Then simply set all joints to force/torque mode, in the dynamic settings for the joint, enable the motor, enable the control loop and select the PID controller. There you can adjust the PID values, but also the maximum force/torque, etc.
To set a different target position for your joints, use sim.setJointTargetPosition.

You can post a link to a dropbox or similar.

Cheers

Post Reply