How do I programmatically set the parameters of a Get Transform block?
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!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! 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! matlab, simulink, matlab code, functions MATLAB Answers — New Questions