galou / freecad.cross

CROSS CAD and ROS, an Open-Source Synergy; ROS workbench for FreeCAD
GNU Lesser General Public License v2.1
85 stars 22 forks source link

Wrong description of "Set placement" tool #32

Closed drfenixion closed 5 months ago

drfenixion commented 6 months ago

"a CROSS::Joint, the "child" LCS on the parent link, and the "parent" LCS on the child link" If do that joint will be placed in wrong position. Only working way is a "CROSS::Joint, the "parent" LCS on the child link, and the "child" LCS on the parent link". Thus should be changed the selection of links LCS.

"CROSS::Joint, the LCS of the parent link, and the LCS of the child link on the same link," - this works ONLY for "centered" supporting LCS (their center positions on 0,0 coordinate of basic axies). For example if you use cude (from Part workbench) which have 0.0 coordinate on one of his angles (and thos body not "centered") and set LCS on his edge center this selection tip will works wrong (join will be placed in wrong position). This should be changed to - "CROSS::Joint, the SUPPORTING LCS of the parent link, and the LCS of the child link on the same link (works only for centered supporting LCS, you must place supporting LCS on 0.0 coordinate of basic axis),"

It is the reason why i couldn't get any useful result before just experimenting a lot.

Corrected tips: "CROSS::Joint, the "parent" LCS on the child link, and the "child" LCS on the parent link". "CROSS::Joint, the supporting LCS of the parent link, and the LCS of the child link on the same link (works only for centered supporting LCS, you must place supporting LCS on 0.0 coordinate of basic axis),"

Update. Center rule applicable to all Joint Set position ways. Because if your LCS of child link will not at zero coordinates of axis you will get wrong placement using Set placement tool.

Therefore tip - center of your body link must be in zero coordinate of axis and his LCS must be in same zero coordinate. One more time - LCS must be at zero axis coordinate and it must be center of supposed Joint of this link. If so Set placement tool for joints will work right.

You can move origin by using macro (if you already have wrong builded or imported parts with wrong origin) https://wiki.freecad.org/Macro_MoveToOrigin It let you centers body.

drfenixion commented 6 months ago

Because of so many rules and preparation of using current Set placement tool. It nice to make new tool that just will connect LCS of child and LCS of parent link without caring of centering LCS of child to origin point. Looks that can be achieved using corrected math of current Set placement tool. Or maybe this is bug and just need to fix that. @galou , what do you think?

If you dont know i talking about you can just move child link body internaly relatively his origin point after that place LCS not at zero coordinate and tring to use Set placement tool for joint. You will get Joint placement offset equal to internal body transfer relatively his origin.

galou commented 6 months ago

There is actually no need to move objects around. Please let me some little time and I'll improve the wiki with the SetPlacement tutorial for joints.

galou commented 6 months ago

Can you please try the mini tutorial about SetPlacement for joints?

drfenixion commented 6 months ago

Can you please try the mini tutorial about SetPlacement for joints?

Thank you. I tryed. It is working . But docs have some actions missed between instructions (i know what todo but newbe can stuck). Also it is not a good way to teach "Setting the MountedPlacement" and "Setting the Origin of joints" on differents projects.

I believe it should be one simple project (without redundant parts, it looks the robot_5r would be nice to adapt) and steps should be: 1) "Setting the MountedPlacement" 2) "Setting the Origin of joints"

for complete picture of needed actions todo

About my issue. Looks i forgot "Setting the MountedPlacement" step. Maybe that is reason of necessity centering LCS to origin of bodies. I just did only "Setting the Origin of joints". Currently all MountedPlacement of my own project are [0.00 0.00 1.00]; 0.00; [0.00 mm 0.00 mm 0.00 mm]. I will try to reasamble my project with "Setting the MountedPlacement" step also.

drfenixion commented 5 months ago

Tips for newbe.

It is better to use centered bodies (parent (where link must be connected to his parent link) LCS at 0.0 coordinate of axis). Using of not centered links forces you to use "Set mounted placement of child link", it is ok but more actions.

Also is better to use same direction of LCS for links. Using of diffent direction LCS can confuse you then you will use "Set Placement" tool becuse you will need to search correct combination of selection (child-parent link, child-parent LCS, etc). Inertia attachment type with same direction works for me.

This tips will let you do less actions of setting Set placement of Joints, links.

Worked ways to use "Set Placement" tool:

1)

Set mounted placement of child link. Select: child link, parent link, parent LCS of child link (where child must be connected to parent link)). Click to Set Placement tool. Your Mounted placement will setted to your LCS. It is needed to positioning joint inside child link. If you use centered links with parent LCS at 0.0 coordinate of axis and correct orientation angle of body at modeling stage this step no need.

Set joint placement. Select: join, parent LCS of parent link, child LCS of parent link (where parent must be connected to child link). Click to Set placement tool.

2)

Set mounted placement of child link. Same as in firts way.

Set joint placement. Select: join, parent LCS of child link, child LCS of parent link (where parent must be connected to child link). Click to Set placement tool.

Set mounted placement of parent link. Select: parent link, child link, parent LCS of child link (where is child must be connected to parent link)). Click to Set Placement tool. This step may be not necessary if child link is centered and corrent oriented.

How you can see first way is shorter.