Search found 1014 matches

by fferri
25 Apr 2024, 08:05
Forum: General questions
Topic: How to export point cloud data
Replies: 1
Views: 33

Re: How to export point cloud data

Read point cloud content with sim.getPointCloudPoints and write to text file:

Code: Select all

local points = sim.getPointCloudPoints(pointCloudHandle)
local f = assert(io.open(filename, 'w'))
for i = 1, #points, 3 do
    f:write(string.format('%f, %f, %f\n', points[i], points[i+1], points[i+2]))
end
f:close()
by fferri
25 Apr 2024, 08:00
Forum: General questions
Topic: Question about sim.setJointTargetPosition vs. sim.setJointPosition
Replies: 1
Views: 22

Re: Question about sim.setJointTargetPosition vs. sim.setJointPosition

Wether you can directly set the joint position or not depends in which joint mode and control mode the joint is.
by fferri
24 Apr 2024, 17:05
Forum: General questions
Topic: Control the joint to rotate more than 360 degrees
Replies: 3
Views: 96

Re: Control the joint to rotate more than 360 degrees

It is correct to use sim.moveToConfig. You can use a 1-dimensional config, starting from {0} , ending in {1} , which would be the parameter for interpolation between an initial and a final config/position/pose. To interpolate between 2 joint positions you can use (1 - config[1]) * initialJointPos + ...
by fferri
24 Apr 2024, 16:54
Forum: Bug reports
Topic: Pb of refresh through remote connexion
Replies: 2
Views: 26

Re: Pb of refresh through remote connexion

try running in Xvfb? that would use software rendering
by fferri
23 Apr 2024, 09:46
Forum: General questions
Topic: Control the joint to rotate more than 360 degrees
Replies: 3
Views: 96

Re: Control the joint to rotate more than 360 degrees

If you don't need to use a cyclic joint, simply selecting a joint range larger than 2*pi is enough to make the joint turn more than 1 full revolution when setting a large enough target position (via sim.setJointTargetPosition). If instead you are forced to used a cyclic joint, the solution is to use...
by fferri
22 Apr 2024, 09:25
Forum: General questions
Topic: Vision sensor object masks
Replies: 3
Views: 75

Re: Vision sensor object masks

Actually, even better (and faster) than that, you can set the vision sensor render mode to "color coded handles", then each object is rendered with a unique color corresponding to its handle. Then you can go through all pixels and decode which object it relates to ( handle = unsigned int i...
by fferri
22 Apr 2024, 09:04
Forum: General questions
Topic: Vision sensor object masks
Replies: 3
Views: 75

Re: Vision sensor object masks

You can achieve something like selective rendering by setting the vision sensor to explicit handling, then adjusting visibility layer of all objects before/after rendering to only "see" the interesting objects. Depth map gives you something almost resembling a binary map (simply apply some...
by fferri
22 Apr 2024, 08:26
Forum: General questions
Topic: Robot strange behavior with OMPL
Replies: 1
Views: 66

Re: Robot strange behavior with OMPL

When the robot is outside the linear guide (in the tree), paths are found that lead to the desired location. When I place the robot inside the linear guide (on the tree) the positions found from there no longer coincide with those intended. I don't really understand any of that; but usually, when s...