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

[panda_eus] Skip generating dual_panda.l when franka_description or xacro is old to avoid build failure #1751

Merged
merged 2 commits into from
Dec 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[panda_eus] Check xacro version explicitly
Previously, I thought using melodic and upper is enough because I assumed all packages are up to date
  • Loading branch information
pazeshun committed Dec 6, 2022
commit 69679f025bbdeeb3f8717a066bbc7561d191f857
16 changes: 9 additions & 7 deletions jsk_panda_robot/panda_eus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ catkin_package()
### dual_panda.l generation
###
set(_franka_description_min_ver "0.10.0")
if(franka_description_FOUND AND (NOT ("$ENV{ROS_DISTRO}" STRLESS "melodic"))
AND (NOT ("${franka_description_VERSION}" VERSION_LESS "${_franka_description_min_ver}")))
# Why ROS_DISTRO >= melodic:
# xacro.load_yaml cannot be recognized under melodic, while it is recommended on melodic and upper.
# PR introducing xacro.load_yaml: https://github.com/ros/xacro/pull/283
# Related issue: https://github.com/ros/xacro/issues/298
set(_xacro_min_ver "1.13.14")
if(franka_description_FOUND
AND (NOT ("${franka_description_VERSION}" VERSION_LESS "${_franka_description_min_ver}"))
AND (NOT ("${xacro_VERSION}" VERSION_LESS "${_xacro_min_ver}")))
# Why franka_description >= 0.10.0:
# dual_panda.urdf.xacro assumes file structure of franka_description >= 0.10.0.
# See https://github.com/frankaemika/franka_ros/compare/0.9.1...0.10.0 for details.
# Why xacro >= 1.13.14:
# xacro.load_yaml cannot be recognized when xacro < 1.13.14, while it is recommended when xacro >= 1.13.14.
# PR introducing xacro.load_yaml: https://github.com/ros/xacro/pull/283
# Related issue: https://github.com/ros/xacro/issues/298
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/models/dual_panda.l
COMMAND rosrun euscollada collada2eus -I dual_panda.urdf -C dual_panda.yaml -O dual_panda.l
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/models
Expand All @@ -35,8 +37,8 @@ if(franka_description_FOUND AND (NOT ("$ENV{ROS_DISTRO}" STRLESS "melodic"))
add_custom_target(generate_panda_lisp ALL DEPENDS ${PROJECT_SOURCE_DIR}/models/dual_panda.l)
else()
message(WARNING "Dependency is not met, so skip generating dual_panda.l")
message(WARNING "ROS_DISTRO: $ENV{ROS_DISTRO}, must be >= melodic")
message(WARNING "franka_description version: ${franka_description_VERSION}, must be >= ${_franka_description_min_ver}")
message(WARNING "xacro version: ${xacro_VERSION}, must be >= ${_xacro_min_ver}")
endif()


Expand Down