How do I programmatically set the parameters of a Get Transform block?
Mostrar comentarios más antiguos
I want to programmatically set the rigid body tree parameter of a get transform block and I tried doing that using the set_param function. If i write the value of the parameter as a string:
set_param(strcat(modelName, '/Get Transform'), 'RigidBodyTree', 'DOF3_Arm') %DOF3_Arm = importrobot('RobotStructure');
the associated field in the Block's Parameter will just have a string but no rigid body tree, and if I use a variable instead of the string i get the following error:
Error using Script_function_back2WF
Invalid setting in Get Transform block (mask) 'Get Transform' for parameter
'RigidBodyTree'
What is the correct way of setting this parameter? Thank you in advance!
1 comentario
Passing the variable name as a string is the right way to do it.
You need to ensure that "DOF3_Arm" is a valid "RigidBodyTree" object in your base workspace.
The parameter field is expected to show the name of the variable as a string. When you click on the three dots beside it, you will see the location of the variable.
Respuestas (0)
Categorías
Más información sobre Manipulator Modeling en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!