Skip to content

set default value for arg Z of compose()#69

Open
jackie-wayland wants to merge 1 commit intomatthew-brett:mainfrom
jackie-wayland:main
Open

set default value for arg Z of compose()#69
jackie-wayland wants to merge 1 commit intomatthew-brett:mainfrom
jackie-wayland:main

Conversation

@jackie-wayland
Copy link

Proposed Change:

Introduce a default value for the Z parameter in the compose() function. When Z is set to None, it will be assumed to be np.ones(N). This modification will simplify the creation of common homogeneous transformation matrices, such as compose(T, R), which are widely used in robotics.

Justification:

Currently, the compose() function requires explicit specification of the Z parameter, even for simple transformations like compose(T, R). This can be cumbersome and error-prone, as users may forget to include Z or pass an incorrect value.

Setting a default value of np.ones(N) for Z will address these issues by providing a convenient way to create homogeneous transformation matrices without the need for explicit Z specification. This will align with common usage patterns in robotics and other fields.

Benefits:

  • Simplified function usage: Users can easily create common homogeneous transformation matrices without explicitly specifying Z.

  • Reduced error potential: The risk of forgetting or providing an incorrect Z value is minimized.

  • Improved code readability: Code using compose() will be more concise and easier to understand.

Impact:

This change will primarily affect users who rely on compose() to create homogeneous transformation matrices. It will introduce a new default behavior for the Z parameter, but this behavior aligns with common usage scenarios and simplifies the function's usage.

Overall, the proposed change enhances the usability and convenience of the compose() function, particularly for creating common homogeneous transformation matrices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments