Search found 1017 matches

by fferri
18 Nov 2019, 11:53
Forum: General questions
Topic: How can I use joint to realize a bend movement ?
Replies: 6
Views: 895

Re: How can I use joint to realize a bend movement ?

Hello,

if the joint in motor mode you should use sim.setJointTargetPosition rather than sim.setJointPosition.
by fferri
18 Nov 2019, 11:50
Forum: General questions
Topic: Khepera K3 model, how is the UI done?
Replies: 3
Views: 1018

Re: Khepera K3 model, how is the UI done?

How is this done? I want to do something similar for models of my own but all I can see within the khepera's script is a reference to a UI object named "K3_stateVisualization". I can't see that object in the hieracrhy anywhere. Those old-style UIs are deprecated, because they don't offer ...
by fferri
14 Nov 2019, 18:45
Forum: General questions
Topic: How can i use the SimulationTime for calculation ?
Replies: 1
Views: 473

Re: How can i use the SimulationTime for calculation ?

time_1 is nil because the condition distance_1 < 0.9 is false.

Fix the logic of your program. For example check that both variables are not nil:

Code: Select all

if time_1 ~= nil and time_2 ~= nil and time_1 - time_2 > 0 then
    sim.setStringSignal("SafetyStop","1")
end
by fferri
12 Nov 2019, 18:25
Forum: Bug reports
Topic: sim.setJointPosition is not working inside the callback function of subscriber in ROS.Please help me
Replies: 4
Views: 4309

Re: sim.setJointPosition is not working inside the callback function of subscriber in ROS.Please help me

I tested sim.setJointPosition and it works fine also in a ROS callback.

If your joint doesn't move, you have research the cause in the joint mode and the resulting behaviour. Make sure to read and understand Joint types and operation.
by fferri
12 Nov 2019, 08:34
Forum: General questions
Topic: sim.setShapecolor,
Replies: 2
Views: 823

Re: sim.setShapecolor,

You can add a drawing object with sim.addDrawingObject and fill with items via sim.addDrawingObjectItem as the robot passes around.

Check also what types of drawing objects you can add.
by fferri
31 Oct 2019, 08:58
Forum: General questions
Topic: CodeEditor loading problem
Replies: 4
Views: 1262

Re: CodeEditor loading problem

zdenoB wrote: 31 Oct 2019, 08:01 ldd "$dirname/libv_rep.so" #replace libv_rep.so with the library that is having difficulties to load

but I don't know the name of Library behind CodeEditor.
libv_repExtCodeEditor.so
by fferri
31 Oct 2019, 08:46
Forum: General questions
Topic: How to display the planned path?
Replies: 1
Views: 591

Re: How to display the planned path?

It can be done at least in two ways:
by fferri
30 Oct 2019, 09:10
Forum: General questions
Topic: How to smooth the path in V-rep
Replies: 1
Views: 671

Re: How to smooth the path in V-rep

Path smoothing (while maintaining path validity) can only be performed by OMPL via PathSimplifier::smoothBSpline which currently not integrated in the plugin but you could try to modify the plugin code ( v_repExtOMPL/plugin.cpp ), calling the function PathSimplifier::smoothBSpline in void simplifyPa...
by fferri
23 Oct 2019, 16:11
Forum: General questions
Topic: How to create laser cone source?
Replies: 10
Views: 1939

Re: How to create laser cone source?

Not really understanding, sorry. But in V-REP you don't have lasers. What you can do is to use proximity sensors or vision sensors to simulate some of the properties of rays of light. Then you can create drawing objects ( sim.addDrawingObject ) to give a visual feedback (proximity sensors already do...
by fferri
23 Oct 2019, 13:48
Forum: General questions
Topic: How to change the gravity during the simulation
Replies: 1
Views: 1109

Re: How to change the gravity during the simulation

Hello,

you can change the gravity in the general dynamics properties.

You can also change gravity programmatically via sim.setArrayParameter(sim.arrayparam_gravity,{gx,gy,gz}).

Alternatively, you can apply forces/torques to objects via sim.addForce and sim.addForceAndTorque.