Simscape Body Frame Switch

8 views (last 30 days)
controlROS
controlROS on 23 Jul 2016
Answered: Steve Miller on 24 Jul 2016
Hi Everybody,
I am building a robot implementing Pick-and-Place task using Simscape 2nd generation blocks. The robot moves onto the object to be picked. The object is stationary and defined by a mass after a set of frame transformations. I am planning to add the object's frame to the end of the robot for grasping the object at a certain time. But, classical switch does not work in Simscape. PS Switch does not accept frame transformation outputs as input. I cannot use Enabled subsystems either since physical connections do not across Enab. subs.'s boundaries. IF subsystems do not work with Simscape. I even tried defining a very small body at the tip of the robot and changing it with the object by pausing simulation and changing the body geometry with set_param; but set_param cannot change body geometry when simulation paused.
I also tried get the transformation with transform sensor (rotation matrix and Cartesian position wrt world frame) and feed it to the body through a Rigid transform; however, Rigid transform blocks do not have inputs, we need to explicitly write in it.
So, I could not find a method to just switch the object's frame at a certain time instant. Is there any other way to implement this task?
Thanks a lot. I appreciate..

Answers (1)

Steve Miller
Steve Miller on 24 Jul 2016
If I understand your question correctly, you have a robot that is supposed to pick up an object, so you are trying to add that object's mass to the end of the robot arm once it has reached that location. It sounds like you are using the PS Switch block to control which Frame is attached to the end of the robot. That method will not work -- the Physical Signals library is not intended to connect/disconnect Simscape Multibody Frames.
There are a number of ways to implement this. A common method is to put a stiff spring-damper between the Robot and the object where the spring stiffness and damping coefficient are dependent upon an Input Signal. You could use a Switch block to Switch between "connected" (coefficients >0) or "disconnected" (coefficients = 0). You could also use an External Force block which applies Forces and torques based on signals -- you could set those Input Signals to 0 when no object is in the robot's Hand or to nonzero values when the object is there. You will Need to very carefully define the value and orientation of the vector.
Some other items that might be useful:
Here is a pick-and-place model implemented in Simscape (not Simscape Multibody) http://www.mathworks.com/matlabcentral/fileexchange/38515-smart-manufacturing-robotics-cyber-physical-system
This contact forces library would be an option for having your Robot actually pick up the object
Hope this helps! --Steve

Categories

Find more on Discrete Events and Mode Charts in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!