Friction Parameters

Typically: "How do I... ", "How can I... " questions
Post Reply
adamg
Posts: 20
Joined: 21 Feb 2022, 13:09

Friction Parameters

Post by adamg »

Hi,

I am declaring friction values from a Python script using Vortex to an object in a scene , assigning them through the following code

I am just wondering how might I print out the values to ensure it is being correctly assigned in the material properties panel as this is not accessible during the simulation?

Thanks in advance

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

Re: Friction Parameters

Post by coppelia »

Hello,

I can't find your code...

Cheers

adamg
Posts: 20
Joined: 21 Feb 2022, 13:09

Re: Friction Parameters

Post by adamg »

Sorry here is a snippet of the code

Code: Select all

sim.setEngineFloatParam(sim.vortex_body_primlinearaxisfriction,cube0,0,Friction)
Is it possible to print the value assigned in the material properties to the primary linear axis for example?

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

Re: Friction Parameters

Post by coppelia »

Simply use the sim.getEngineFloatParam function? e.g.:

Code: Select all

print(sim.getEngineFloatParam(sim.vortex_body_primlinearaxisfriction,cube0))
When setting that parameter, you have somehow 4 input parameters for the function, but only 3 are expected...

Cheers

adamg
Posts: 20
Joined: 21 Feb 2022, 13:09

Re: Friction Parameters

Post by adamg »

Thanks that must have been where my problem was stemming from !

adamg
Posts: 20
Joined: 21 Feb 2022, 13:09

Re: Friction Parameters

Post by adamg »

Does the sim.setObjectParam function not require 4 input parameters? (https://www.coppeliarobotics.com/helpFi ... tParam.htm)

I am trying to pick and place a cube in CoppeliaSim using both Aluminium gripper fingers and an aluminium cube, trying to investigate at which friction parameters the cube will be successfully pick and place using the Vortex Physics Engine, but it is currently failing to grasp the object? How can i configure this to successfully pick and place the object?

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

Re: Friction Parameters

Post by coppelia »

The c++ version of the sim.getEngineFloatParam function requires 4 parameters, the Lua/Python version only 3.

Not sure what gripper you are trying to use. Grippping/grasping is not always a simple task, and it depends a lot on the gripper and how it was modeled.

Cheers

Post Reply