04-27-2013 06:59 PM
I am trying to simulate a four degree of freedom robotic arm. I have found this thread with this example showing how to simulate a two link arm. I am trying to expand this example to allow for four joints.
I have found that I can expand the cluster of kinematic elements (and the cluster of dynamic elements) by clicking on the edge of the cluster and dragging to the right... effectively adding more clusters to the cluster. (I also expanded the number of "Joint positions" on the Front Panel) When I do this though, the VI no longer works. I get an error saying the that number of joints is not equal to the number of joint positions.
When I expand the cluster of kinematic parameters, the two newest clusters within the cluster stay "grayed out" (as do the numeric values for the joint positions on the Front Panel).
Any suggestions?
I could rebuild the clusters by hand... I guess... but I'm not there yet... any idea how to expand on this example?
04-27-2013 08:06 PM
@slow wrote:
When I expand the cluster of kinematic parameters, the two newest clusters within the cluster stay "grayed out" (as do the numeric values for the joint positions on the Front Panel).
Any suggestions?
I could rebuild the clusters by hand... I guess... but I'm not there yet... any idea how to expand on this example?
What do you mean by the "stay grayed out"?
When you expanded the array, did you enter any values in the new grey elements so that those elements become occupied with data and are no longer greyed out?
04-27-2013 08:14 PM
I probably cannot help very much because I do not have the robotics subVIs.
One area where I may be able to help is with terminology and a misunderstanding which it appears that you have.
On the block diagram of the "one joint robot arm ex.vi" what you called the "cluster of kinematic elements" is not a cluster but an array of clusters. Notice the little Index Display boxes at the upper left corner. When you expand the array, you show more elements. In this case the elements are clusters. The kinematics cluster contains 5 numerics and a typedef enum. The grayed out elements are elements which have not had values assigned. You can show them in the original configuration by increasing the index value.
Expanding the visible number of elements actually did not change anything in the code. To add two elements to the array you need to type something in to the values shown in the grayed out clusters at indexes 2 and 3. It appears that you may need to do the same thing for the Dynamic Parameters array and the Joint Positions array on the front panel. I am qualifying my comments because I am the subVIs so I cannot be sure how things really work.
Lynn
04-28-2013 10:51 AM
Lynn,
Thanks. That makes sense.
I'll try that out and see what happens!
04-28-2013 03:05 PM
Ok. So this is where I'm at right now...
Even though I only have four joints, it was necessary to define a fifth "link" so that it the "lower" arm is visible in the simulation.
Thanks for the help!