Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [eus_cddlib]add eus_cddlib #745

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Naoki-Hiraoka
Copy link
Contributor

@Naoki-Hiraoka Naoki-Hiraoka commented Jan 29, 2020

cddlib
https://inf.ethz.ch/personal/fukudak/cdd_home/
をeuslispから使用します.

以下の2つの形式で表現されるxの存在領域が一致するように,一方の形式での表現から他方の形式へと変換します.

given: V (d * n), R (d * s)
x = V y + R z (sum y = 1, y >= 0, z >= 0)
given: A_eq (m_eq * d), b_eq (m_eq * 1), A_ineq (m_ineq * d), b_ineq (m_ineq * 1)
A_eq x + b_eq = 0
A_ineq x + b_ineq >= 0

@Naoki-Hiraoka
Copy link
Contributor Author

Naoki-Hiraoka commented Feb 1, 2020

libcdd-dev
を入れる必要があるのですが,
https://github.com/ros/rosdistro/blob/master/rosdep/base.yaml
libcdd-devを追加しないとテストに通らないようです

@k-okada
Copy link
Member

k-okada commented Feb 1, 2020 via email

@Naoki-Hiraoka
Copy link
Contributor Author

ありがとうございます.
PRを作成しました
ros/rosdistro#23663

Copy link
Member

@k-okada k-okada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please consider add cddlib to jskeus directly, see euslisp/jskeus#555 for example.

add_library(eus_cddlib SHARED src/eus_cddlib.c)
set_target_properties(eus_cddlib PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
target_link_libraries(eus_cddlib cddgmp)
install(DIRECTORY lib/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do not need this because we already have "install(TARGETS eus_cddlib"

@@ -0,0 +1,3 @@
# eus_cddlib

Use cddlib (https://inf.ethz.ch/personal/fukudak/cdd_home/) from EusLisp for finding vertices of convex polytopes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please explain example program (eus_cddlib/euslisp/test-eus-cddlib.l) , what is input and what is output, test-eus-cddlib.l seems to show output as images, so please add that image to README.md

@@ -0,0 +1,2 @@
(compiler::compile-file-if-src-newer (format nil "~A/euslisp/eus-cddlib" (ros::resolve-ros-path "package://eus_cddlib")))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think
(let ((old-flag ros::*compile-message*)) (setq ros::*compile-message* t) (load "package://eus_cddlib/euslisp/eus-cddlib.l")) (setq ros::*compile-message* old-flag))) is fine.
https://github.com/jsk-ros-pkg/jsk_roseus/blob/b214284e24ad6287bf17545b9a73c541190fac1a/roseus/euslisp/roseus.l#L268

I'm also interested to see how much performance improvement can be achieved with the compiled code.

@Naoki-Hiraoka
Copy link
Contributor Author

@YoshimotoRibayashi @kindsenior cddlibのeusラッパーはこちらです。

需要がなさそうだったので僕の個人ソフトウェアとしてhttps://github.com/Naoki-Hiraoka/eus_cddlib で開発を進めていましたが、需要があるのであればjsk_controlか jskeus に管理を移そうと思います。

@YoshimotoRibayashi しばらくした頃に、結局やっぱり使わなかった or 役に立った 等、教えていただけると助かります。

参考までに、cddlibのc++のeigenラッパーはこちらです。https://github.com/Naoki-Hiraoka/cddeigen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants