Skip to content

Commit

Permalink
creo2urdf: retrieve more information from the asm (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene authored Apr 13, 2023
2 parents fb80b2c + 115fe0f commit 4bd0f27
Show file tree
Hide file tree
Showing 11 changed files with 331 additions and 135 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ include(GNUInstallDirs)
include(FeatureSummary)

find_package(YCM 0.12 REQUIRED)
# Needed for https://github.com/robotology/idyntree/issues/1065
find_package(Eigen3 REQUIRED)
find_package(iDynTree REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# Control where libraries and executables are placed during the build.
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# creo2urdf
Generate URDF model from CREO mechanisms.

## Installation

### Dependencies
Right now `creo2urdf` plugin needs that the dependencies are compiled and linked **statically**:
- Download [vcpkg](https://github.com/microsoft/vcpkg): `git clone https://github.com/microsoft/vcpkg`
- Bootstrap vcpkg: `.\vcpkg\bootstrap-vcpkg.bat`
- Run `[path to vcpkg]/vcpkg install --triplet x64-windows-static-md eigen3 libxml2 assimp`
- Compile idyntree from source following the instructions in https://github.com/robotology/idyntree/blob/master/doc/build-from-source.md, remembering to pass `-DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static-md` and `-DBUILD_SHARED_LIBS:BOOL=OFF` to ensure that iDynTree is compiled as static.
- Install iDynTree

### Build `creo2urdf`

- Pass `-DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static-md` to the creo2urdf compilation, remembering also to pass the iDynTree's installaton location via `CMAKE_PREFIX_PATH`.

For who uses CMake integrate in Visual Studio `-DCMAKE_TOOLCHAIN_FILE` option has not to be passed to `CMake command arguments` but in the `vcpkg.cmake` file path has to be set in `CMake toolchain file`


### Maintainers
This repository is maintained by:

Expand Down
6 changes: 5 additions & 1 deletion src/creo2urdf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ add_compile_definitions(creo2urdf PUBLIC PRO_MACHINE=36
PRO_OS=4)

# Link dependencies
target_link_libraries(creo2urdf PUBLIC protk_dllmd_NU
target_link_libraries(creo2urdf PRIVATE iDynTree::idyntree-modelio
iDynTree::idyntree-high-level
protk_dllmd_NU
otk_cpp_md
otk_no222_md
ucore
Expand All @@ -67,6 +69,8 @@ target_link_libraries(creo2urdf PUBLIC protk_dllmd_NU
mpr
netapi32)



# FIXME all these win32 libraries that are used by protk dll have to be set as dependencies of the target
## FIXME
list(APPEND CREO2URDF_PUBLIC_DEPS)
Expand Down
7 changes: 7 additions & 0 deletions src/creo2urdf/app/protk.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NAME creo2urdf
STARTUP dll
EXEC_FILE <repository-parent-path>\creo2urdf\build\x64-Release\bin\creo2urdf.dll
TEXT_DIR <repository-parent-path>\creo2urdf\src\creo2urdf\text\
DELAY_START true
ALLOW_STOP true
END
7 changes: 7 additions & 0 deletions src/creo2urdf/include/creo2urdf/Creo2Urdf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* Copyright (C) 2006-2023 Istituto Italiano di Tecnologia (IIT)
* All rights reserved.
*
* This software may be modified and distributed under the terms of the
* BSD-3-Clause license. See the accompanying LICENSE file for details.
*/
Loading

0 comments on commit 4bd0f27

Please sign in to comment.