Skip to content

Commit a1e514c

Browse files
author
Felix Exner (fexner)
authored
Install start ursim (#155)
* Install start_ursim.sh file This way we can use it from the driver packages and don't have to duplicate code * Fix execution bit * Install external control URCap on URSim * use catkin_install_python when available * Do not ust catkin_install_python since it is not a python script...
1 parent 57c1a6a commit a1e514c

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ install(EXPORT urcl_targets
8989
FILE urclTargets.cmake
9090
NAMESPACE ur_client_library::)
9191

92+
if(CATKIN_PACKAGE_BIN_DESTINATION)
93+
install(PROGRAMS scripts/start_ursim.sh
94+
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
95+
)
96+
else()
97+
install(PROGRAMS scripts/start_ursim.sh
98+
DESTINATION lib/${PROJECT_NAME}
99+
)
100+
endif()
101+
92102
include(CMakePackageConfigHelpers)
93103
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/ur_client_libraryConfigVersion.cmake VERSION 0.0.3
94104
COMPATIBILITY SameMajorVersion)

scripts/start_ursim.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
# POSSIBILITY OF SUCH DAMAGE.
3030

3131
PERSISTENT_BASE="${HOME}/.ursim"
32+
URCAP_VERSION="1.0.5"
3233

3334
help()
3435
{
@@ -138,6 +139,12 @@ mkdir -p "${PROGRAM_STORAGE}"
138139
URCAP_STORAGE=$(realpath "$URCAP_STORAGE")
139140
PROGRAM_STORAGE=$(realpath "$PROGRAM_STORAGE")
140141

142+
# Download external_control URCap
143+
if [[ ! -f "${URCAP_STORAGE}/externalcontrol-${URCAP_VERSION}.jar" ]]; then
144+
curl -L -o "${URCAP_STORAGE}/externalcontrol-${URCAP_VERSION}.jar" \
145+
"https://github.com/UniversalRobots/Universal_Robots_ExternalControl_URCap/releases/download/v${URCAP_VERSION}/externalcontrol-${URCAP_VERSION}.jar"
146+
fi
147+
141148

142149
# Check whether network already exists
143150
docker network inspect ursim_net > /dev/null

0 commit comments

Comments
 (0)