Greetings,
I have recently started to experiment with Scone and I have a question. Is it possible to set up a scone scenario, where a certain body or end point (e.g. fingertip) follows a user defined trajectory (a 2D rotary motion)? I suppose the Jump scripting example can be useful?
Also, i have a problem with the 3D viewer, it just disappeared and i cant find a way to make it visible again.
Kind regards,
Konstantinos Risvas
University of Patras
Use Scone to set body trajectory
- Thomas Geijtenbeek
- Posts: 460
- Joined: Wed Mar 12, 2014 8:08 am
Re: Use Scone to set body trajectory
The best approach is indeed to use a ScriptMeasure, as it gives you the most flexibility. Inside your lua script, you can track a body by using the following code as a basis:
Concerning the missing 3D viewer, do you remember what happened before it disappeared?
For now, you can fix it by deleting the following entry in the windows registry:
Let me know if this helps!
Code: Select all
function init( model )
-- find the body you want to track
body = model:find_body( "yourbodyname" )
-- keep track of the error
tracking_error = 0
end
function update( model )
-- get current com position
local pos = body:com_pos()
-- update the tracking error
tracking_error = tracking_error + <insert your algorithm here>
return false
end
function result( model )
-- This function is called at the end of the simulation
return tracking_error
end
For now, you can fix it by deleting the following entry in the windows registry:
Code: Select all
HKEY_CURRENT_USER\Software\SCONE\SconeStudio
- Kostas Risvas
- Posts: 12
- Joined: Thu Oct 03, 2019 10:24 pm
Re: Use Scone to set body trajectory
Thanks a lot, now the 3D viewer appears again. if i remember correctly, before it disappeared i exited Scone while an optimization was running (actually my pc restarted).
Kind regards,
Konstantinos
Kind regards,
Konstantinos
- Kostas Risvas
- Posts: 12
- Joined: Thu Oct 03, 2019 10:24 pm
Re: Use Scone to set body trajectory
Greetings again,
I would like to use Mobl model of upper extremity to perform the above trajectory tracking. Since all examples are for gait or jump, is there something i need to consider or set up in order to make the model work? Also, when I try to use a similar approach as with standing jump, in order to move the hand up, the optimization process takes forever to start even if i greatly reduce the model's complexity.
Kind regards,
Konstantinos
I would like to use Mobl model of upper extremity to perform the above trajectory tracking. Since all examples are for gait or jump, is there something i need to consider or set up in order to make the model work? Also, when I try to use a similar approach as with standing jump, in order to move the hand up, the optimization process takes forever to start even if i greatly reduce the model's complexity.
Kind regards,
Konstantinos
- Thomas Geijtenbeek
- Posts: 460
- Joined: Wed Mar 12, 2014 8:08 am
Re: Use Scone to set body trajectory
Sorry for the late response, I missed your post! Please check out this suggestion.