From 3556fa8a6d2fea66b4539deda0427acb6bdad5b2 Mon Sep 17 00:00:00 2001 From: Saray Date: Tue, 19 Mar 2024 13:44:17 +0100 Subject: [PATCH] vicon bridge added as separate launch file with argument, export files for dinova1 and 2, --no-cache in build file --- docker/build | 2 +- export => export_dinova1 | 4 ++-- export_dinova2 | 22 +++++++++++++++++++ .../src/launcher/launch/vicon_node.launch | 21 ++++++++++++++++++ 4 files changed, 46 insertions(+), 3 deletions(-) rename export => export_dinova1 (85%) create mode 100644 export_dinova2 create mode 100644 ros/noetic/src/launcher/launch/vicon_node.launch diff --git a/docker/build b/docker/build index f7e3b74..03ff8ac 100644 --- a/docker/build +++ b/docker/build @@ -39,4 +39,4 @@ if [ -z "$INSTALL" ]; then fi cd .. -sudo docker build -t compliant_control_${ROS}_${INSTALL} -f docker/Dockerfile --build-arg ROS=${ROS} --build-arg INSTALL=${INSTALL} . \ No newline at end of file +sudo docker build --no-cache -t compliant_control_${ROS}_${INSTALL} -f docker/Dockerfile --build-arg ROS=${ROS} --build-arg INSTALL=${INSTALL} --privileged . diff --git a/export b/export_dinova1 similarity index 85% rename from export rename to export_dinova1 index 1785481..fa6e5e2 100644 --- a/export +++ b/export_dinova1 @@ -1,5 +1,5 @@ #!/bin/bash - +# initialize ROS MASTER URI and ROS_IP for dinova1 (dingo 1 + kinova 1) # export ROS_MASTER_URI=http://192.168.0.121:11311 DEVICE_IP="" @@ -19,4 +19,4 @@ else export ROS_IP="${DEVICE_IP}"; echo ROS_MASTER_URI: ${ROS_MASTER_URI} echo ROS_IP: ${ROS_IP} -fi \ No newline at end of file +fi diff --git a/export_dinova2 b/export_dinova2 new file mode 100644 index 0000000..e3b4662 --- /dev/null +++ b/export_dinova2 @@ -0,0 +1,22 @@ +#!/bin/bash +# initialize ROS MASTER URI and ROS_IP for dinova2 (dingo 2 + kinova 2) +# export ROS_MASTER_URI=http://192.168.0.122:11311 + +DEVICE_IP="" +IPs=$(hostname -I) +for IP in $IPs +do + if [[ $IP == *"192.168.0."* ]]; then + DEVICE_IP=$IP; + break; + fi +done + +if [ -z "$DEVICE_IP" ]; then + echo Device is not in expected newtork.; +else + export ROS_MASTER_URI=http://192.168.0.122:11311; + export ROS_IP="${DEVICE_IP}"; + echo ROS_MASTER_URI: ${ROS_MASTER_URI} + echo ROS_IP: ${ROS_IP} +fi diff --git a/ros/noetic/src/launcher/launch/vicon_node.launch b/ros/noetic/src/launcher/launch/vicon_node.launch new file mode 100644 index 0000000..1f0ac18 --- /dev/null +++ b/ros/noetic/src/launcher/launch/vicon_node.launch @@ -0,0 +1,21 @@ + + + + + + + + + + + + +