Search found 1003 matches

by fferri
08 Apr 2024, 10:25
Forum: General questions
Topic: Java ZMQ Remote API
Replies: 14
Views: 210

Re: Java ZMQ Remote API

Make sure to use the latest version of CoppeliaSim. You are using an old version. In the latest version of Example.java there are more examples. About your other question: Object[] is an array of Object which is the superclass of all types, indicating a no better specified type. Object[] is used as ...
by fferri
08 Apr 2024, 09:59
Forum: General questions
Topic: Java ZMQ Remote API
Replies: 14
Views: 210

Re: Java ZMQ Remote API

ConfigCallBack callback = (configs1, vel1, accel1, sim) -> { int i = 0; for (int joint : joints) { if (sim.isDynamicallyEnabled(joint)) { sim.setJointTargetPosition(joint, configs1.get(i)); } else { sim.setJointPosition(joint, configs1.get(i)); } i++; } }; this.getClient().getSim().moveToConfig( -1...
by fferri
08 Apr 2024, 09:53
Forum: General questions
Topic: Java ZMQ Remote API
Replies: 14
Views: 210

Re: Java ZMQ Remote API

The point is that sim, simT and the result of RemoteAPIClient.getSim() are all the same thing which you are fetching three times.

just wanted to make sure wether you understand the Java ZMQ remote API client interface...
by fferri
08 Apr 2024, 08:19
Forum: General questions
Topic: Java ZMQ Remote API
Replies: 14
Views: 210

Re: Java ZMQ Remote API

lumeqi wrote: 06 Apr 2024, 06:40 RemoteAPIObjects._sim simT = getClient().getSim();
what's that?
lumeqi wrote: 06 Apr 2024, 06:40 if (sim.isDynamicallyEnabled(joint)) {
what's sim here?
lumeqi wrote: 06 Apr 2024, 06:40 this.getClient().getSim().moveToConfig(
same...
by fferri
08 Apr 2024, 08:16
Forum: General questions
Topic: DH parameters
Replies: 1
Views: 50

Re: DH parameters

The concept of robot configuration aims to conveniently represent a robot as a vector of joint positions. If the robot geometry is the same (same DH params, same joints ranges & orientation), the same robot configuration vector will describe the same pose both in CoppeliaSim and in Robotics Tool...
by fferri
08 Apr 2024, 08:11
Forum: General questions
Topic: How to input the data of RGB image gotten by Coppeliasim into Matlab
Replies: 1
Views: 67

Re: How to input the data of RGB image gotten by Coppeliasim into Matlab

From zmqRemoteApi/clients/matlab/synchronousImageTransmission.m:

Code: Select all

    [img, resX, resY] = sim.getVisionSensorCharImage(visionSensorHandle);
    % display image in MATLAB:
    imshow(flip(permute(reshape(img, 3, resY, resX), [3 2 1]), 1));
by fferri
08 Apr 2024, 08:05
Forum: General questions
Topic: How to create custom ui
Replies: 3
Views: 85

Re: How to create custom ui

That's not correct.

You have to add simUI = require 'simUI' instead. Plugins have to be loaded explicitly (implicit loading is only a backwards compatibility feature).
by fferri
08 Apr 2024, 08:01
Forum: General questions
Topic: How can I input sequence of Pose into Coppelisasim just to display animation?
Replies: 3
Views: 63

Re: How can I input sequence of Pose into Coppelisasim just to display animation?

Yes, you can use e.g. a text or csv file...

Code: Select all

poses = {}
for line in io.lines('poses.csv') do
    local pose = map(tonumber, string.split(line, ','))
    table.insert(poses, pose)
end
by fferri
05 Apr 2024, 10:30
Forum: General questions
Topic: How can I input sequence of Pose into Coppelisasim just to display animation?
Replies: 3
Views: 63

Re: How can I input sequence of Pose into Coppelisasim just to display animation?

Make sure the object to animate is static, then apply the poses sequentially with sim.setObjectPose, e.g.: function sysCall_init() handle = sim.getObject '.' poses = { {0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, 1}, ... } end function sysCall_actuation() index = (index or 0) + 1 if index <= #poses the...
by fferri
05 Apr 2024, 10:23
Forum: General questions
Topic: Java ZMQ Remote API
Replies: 14
Views: 210

Re: Java ZMQ Remote API

If a list is used in Python, in Java that would be List<T>, with T being the type of the elements of the list.

There are a couple of examples in zmqRemoteApi/clients/java/src/main/java.