replaceBody(robot,bodyname,newbody)
replaces the body in the robot model with the new body. All properties of the body are
updated accordingly, except the Parent and Children
properties. The rest of the robot model is unaffected.
Specify dynamics properties for the two bodies. Add the bodies to the robot model. For this example, basic values for a rod (body1) with an attached spherical mass (body2) are given.