vehicle controller final point orientation inconsistent

Forum Forums Visual Components 4.1 Python Programming in VC vehicle controller final point orientation inconsistent

This topic contains 2 replies, has 2 voices, and was last updated by Avatar BaiYang 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14447
    Avatar
    BaiYang
    Participant

    hello guys,

    I control a component by vehicle controller,when arrive at the final point,the position of component is right,but the orientation of component is inconsistent.

    how to ensure the orientation of component consist with the final point orientation?

    Thanks a lot.

    #14452
    zesty
    zesty
    Moderator

    One way is to wait until the vehicle reaches the final point, and then rotate the vehicle to get the desired orientation. That is usually what I do in simple cases.

    Another way is to wait until the final destination is reached, and then modify the component’s position matrix. This is used often, and you might see examples of that approach in the deprecated agv scripts.

    You could also try passing an orientation point immediately after assigning the control points to the vehicle, but not sure if that is implemented in 4.x.

    Things to consider when orientation is inconsistent:

    • Check the control points. If possible, use frames or matrics and then pass their position vectors. If not then make sure the vectors are valid AND add more if needed to influence the vehicle, for example when executing a curvlinear path that requires an interpolation of 0.0
    • Check the vehicle’s origin. It is the component’s origin, so offset it as needed using the vehicle API. If not working then consider moving the component origin.

    To get things started, try adding a few more points at the end of your path and see if that fixes things.

    #14469
    Avatar
    BaiYang
    Participant

    Hi zesty,

    Thanks for your reply very much!

    I understand the second method you write,but the first method i don’t quiet understand.

    Besides, i tried the latter method,but it was not work.

    I attach my test layout as follow.I think the reason is i don’t know how to use the addOrientationPoint() method.

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.