HiroIshida / yamaopt

robotic optimal sensor placement
MIT License
0 stars 1 forks source link

Change output result for better visualization #21

Closed 708yamaguchi closed 2 years ago

708yamaguchi commented 2 years ago

This PR uses https://github.com/HiroIshida/yamaopt/pull/19 so that @HiroIshida wouldn't have to resolve the conflict. Please merge after https://github.com/HiroIshida/yamaopt/pull/19

In this PR, I show axis of polygons for debugging.

Also, I removed is_convex check from polygon_to_desired_rpy to show the axis of concave polygons. I think the check is needed only for polygon_to_trans_constraint.

polygon_axis

708yamaguchi commented 2 years ago

By the way, how do you use rpy information of polygon for optimization?

It looks like there is a constraint where the rpy of the robot end-coords rpy matches the rpy of the polygon. https://github.com/HiroIshida/yamaopt/blob/3da81e128882a91781c74807b31bbeef3c9b9565/yamaopt/solver.py#L87-L96

~~However, in the previous image, the target green polygon's axis and robot end-coords axis are not aligned. Is it normal thing?~~ (EDIT: Sorry, my misunderstanding)

Also, ideally, the equality constraint on rpy should not apply to the robot wrist roll axis(x-axis), in my thoughts. In other words, the x-axis of the robot's end-coords is perpendicular to the polygon, but rotation around the x-axis is allowed. I will try solving this issue. (-> summarize my issues to https://github.com/HiroIshida/yamaopt/issues/1)

Please correct me if I am wrong. Sorry for my poor knowledge on optimization...

708yamaguchi commented 2 years ago

Sorry, I did not understand skrobot uses not rpy but ypr to create Coordinates. I fixed it.

https://github.com/iory/scikit-robot/blob/7f7427c420f8aeaa91cf380a53f33fac774bb016/skrobot/coordinates/base.py#L169-L185 fixed_axis

708yamaguchi commented 2 years ago

Close via https://github.com/HiroIshida/yamaopt/pull/21