Page 1 of 1

How to modify joint positions in Default Setting through code or command?

Posted: 27 Dec 2024, 07:21
by ReaLMagguan
I tried using CoppeliaSim to simulate the control of the robotic manipulator, and I modified the joint position configuration of the robotic manipulator through setJointPosition.

When I run my program, I find CoppeliaSim reporting an error:
Detected non-default settings (time steps and/or dyn. engine global settings).
And the robotic manipulator in the simulation will be forced to return to the joint position configuration of the robotic manipulator in the Default Setting in a very short time.

I want to modify the joint position configuration of the robotic arm through code now. How can I do this?

Re: How to modify joint positions in Default Setting through code or command?

Posted: 29 Dec 2024, 17:30
by coppelia
Hello,

the reported message is a warning, not an error. It simply means that major settings are not default. That's all.

Individual joints are not concerned.

Not sure what you mean with your description.
Setting the position of a joint depends on the joint type (kinematic or dynamic mode). In the first case you'd use sim.setJointPosition, in the second case you'd use sim.setJointTargetPosition (if the joint is in position control mode) and sim.setJointTargetForce (if the joint is in force control mode).

Cheers

Re: How to modify joint positions in Default Setting through code or command?

Posted: 30 Dec 2024, 09:34
by ReaLMagguan
Hello,

Thanks for your reply. Those instructions still didn't solve my problem.

When I import a URDF into CoppeliaSim, the robot always starts with its own default initial configuration, like this:
\(q=[0, 0, 0, 0, 0, 0, 0]^{T}\)
image: http://tvax4.sinaimg.cn/mw690/0060SJeQl ... 0nn7ag.jpg

I want to change this initial configuration to another configuration, like this:
\(q=[0.3, 0.0, 0.2, -1.6, 0.0, 1.6, -3.1]^{T}\)
image:http://tvax3.sinaimg.cn/mw690/0060SJeQl ... 0fhgsc.jpg

I have verified that all joint values are within their respective limits.

I tried using sim.setJointTargetPosition and sim.setJointPosition to achieve the desired configuration. However, the robot only stays in the desired configuration temporarily and then returns to its default initial configuration.

How can I fix this?

Re: How to modify joint positions in Default Setting through code or command?

Posted: 06 Jan 2025, 13:10
by coppelia
We cannot access the images.
Also, try to post the URDF maybe

Cheers