simExtOMPL_setValidStateSamplerCallback not working as intended
Posted: 17 Jan 2018, 00:36
I believe the function simExtOMPL_setValidStateSamplerCallback is not working as intended. I think the callback functions (args 2 and 3) are not being set and you can put in invalid function names and still get a return code of 1 instead of the failure code of 0. Below is how I've tested this and came to this conclusion.
Have been working on a simple scene to do some 3d path planning with two spheres and a bar in the middle. The goal of this scene is have two modes of path planning. The first is when the sphere runs along the ground, and the other one with the default 3d path planning (so the sphere can float above the step)
download link for the scene is at https://www.dropbox.com/s/z7sgbfpe0zfz1 ... t.ttt?dl=0
Image of the scene is at https://www.dropbox.com/s/8weziqakni9vb ... t.png?dl=0
In the script in start_config, I have the following lines of interest
When run this scene I get the output:
I also get the same print result if I un-comment the line
Which makes me suspect that the simExtOMPL_setValidStateSamplerCallback function does not actually check to see if the function name arguments are valid and also does not set those functions as the callback ones.
Have been working on a simple scene to do some 3d path planning with two spheres and a bar in the middle. The goal of this scene is have two modes of path planning. The first is when the sphere runs along the ground, and the other one with the default 3d path planning (so the sphere can float above the step)
download link for the scene is at https://www.dropbox.com/s/z7sgbfpe0zfz1 ... t.ttt?dl=0
Image of the scene is at https://www.dropbox.com/s/8weziqakni9vb ... t.png?dl=0
In the script in start_config, I have the following lines of interest
Code: Select all
if (sim_call_type==sim_childscriptcall_initialization) then
-- skipping some lines
ground_samplers = true -- whether or not to use the custom sampler functions
-- skipping some lines
-- set the custom sampling params
if ground_samplers then
r = simExtOMPL_setValidStateSamplerCallback(t, 'ground_sampler', 'ground_near_sampler')
--r = simExtOMPL_setValidStateSamplerCallback(t, 'foo', 'bar') -- also works with fake function names
print('----------------------')
print("ground sampler set with result: " .. r)
print('----------------------')
end
-- skipping some lines
end
Code: Select all
----------------------
ground sampler set with result: 1
----------------------
Code: Select all
--r = simExtOMPL_setValidStateSamplerCallback(t, 'foo', 'bar') -- also works with fake function names