Search found 7925 matches

by coppelia
08 Jul 2020, 15:57
Forum: General questions
Topic: How to control RG2 gripper
Replies: 1
Views: 6

Re: How to control RG2 gripper

Hello, the RG2 gripper model you find in the model library is currently only opening or closing, without the possibility to specify the opening gap. If you use following script instead: function sysCall_init() motorHandle=sim.getObjectHandle('RG2_openCloseJoint') motorVelocity=0.05 -- m/s motorForce...
by coppelia
08 Jul 2020, 10:44
Forum: General questions
Topic: Velocity of simulation is slow
Replies: 1
Views: 5

Re: Velocity of simulation is slow

Hello,

what platform are you running on? Are you using the newest graphic drivers?
Where does the slow-down come from, is it the visualization?

Cheers
by coppelia
08 Jul 2020, 10:42
Forum: General questions
Topic: Getting Depth from Vision Sensor
Replies: 3
Views: 42

Re: Getting Depth from Vision Sensor

I recommend that you switch to CoppeliaSim V4.1.0 (beta available here ), or at least to version CoppeliaSim V4.0.0, since there are a few changes how the vision sensors are handled (i.e. the filters of the vision sensors). When doing so, you will notice that the system automatically attaches a cust...
by coppelia
08 Jul 2020, 10:34
Forum: General questions
Topic: Turning Kuka Youbot by a number of degrees
Replies: 3
Views: 28

Re: Turning Kuka Youbot by a number of degrees

Hello, you would do something similar to what has been done in the demo scene youBotAndHanoiTower.ttt : you need code that will set the wheel velocities to follow a certain object. In that demo scene, the object to follow is youBot_vehicleTargetPosition . The control script is attached to object veh...
by coppelia
08 Jul 2020, 10:26
Forum: General questions
Topic: any good way to move multiple shapes with regular API
Replies: 2
Views: 15

Re: any good way to move multiple shapes with regular API

For simple shapes, dynamic or static, you could do something like: sim.setThreadAutomaticSwitch(false) -- only needed if running inside of a threaded child script local dummy=sim.createDummy(0.01) -- created at the origin sim.setObjectParent(shape1Handle,dummy,true) sim.setObjectParent(shape2Handle,...
by coppelia
08 Jul 2020, 10:20
Forum: General questions
Topic: Robot don't follow the path at begin
Replies: 8
Views: 200

Re: Robot don't follow the path at begin

It runs relatively fine here. The way you control the robot, its speed, etc. is quite unusual. Also, your pick and drop locations are very close to singularities, it is always dangerous to run via IK in those situations. Additionally, we haven't looked into your code at all, since that would be too ...
by coppelia
08 Jul 2020, 10:13
Forum: General questions
Topic: Sim crashes for loading meshes
Replies: 1
Views: 18

Re: Sim crashes for loading meshes

Hello, can you try following: instead of loading the meshes in the function you call, just set a variable and leave. And have the next call to a system callback function handle the load, something like (e.g. in case of a customization script ): function importShape(inInts, inFloats, inStrings, inBuf...
by coppelia
07 Jul 2020, 15:21
Forum: General questions
Topic: Getting Depth from Vision Sensor
Replies: 3
Views: 42

Re: Getting Depth from Vision Sensor

Hello, I think you are retrieving a large portion of the depth buffer. You should specify the size of the portion you want to retrieve, something like: depth=sim.getVisionSensorDepthBuffer(VisionSensor,pack2[5],pack2[6],1,1) Additionally, the blob detection filter retrieves the x/y position of the b...
by coppelia
07 Jul 2020, 14:36
Forum: General questions
Topic: Sending Remote API Commands in Java
Replies: 2
Views: 66

Re: Sending Remote API Commands in Java

Hello, when calling a script function from outside, you should not stay too long in that function, since the whole application will then block. So instead of executing a lengthly code inside of your called function, simply execute a trigger in that function. Something like: function moveLeft(...) da...
by coppelia
07 Jul 2020, 14:30
Forum: General questions
Topic: Calculate run/execution time
Replies: 3
Views: 77

Re: Calculate run/execution time

If you use sim.getSystemTimeInMs then you can see what kind of underlying API functions are used. But basically, those functions only make sense to measure time differences. No absolute times. About the computational effort... that is more difficult. Probably there is a tool that allows to inspect t...