Skip to content

Commit

Permalink
Merge branch 'main' into AutoDig-Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Isopod00 committed Nov 19, 2024
2 parents e05dd76 + 73cffe0 commit ed4f5e8
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 302 deletions.
37 changes: 37 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
**Updating Docker Image:**

If you need to change or update the docker images for the Lunabotics project, start by making your changes to your local Dockerfiles. Make any changes you need here, and push these changes to GitHub. Make sure that the changes you are making are relevant to the docker file that you’re adding it to. If it isn’t, either pick a different file or make a new dockerfile (if you make a new one, make sure to add the new dockerfile name to the image_key in /scripts/enter_isaac_ros_container.sh and /scripts/build_image.sh). As of right now, we’re keeping all of our docker files in Lunabotics/docker and the Nvidia’s files in Lunabotics/src/isaac_ros_common.

After making your changes locally, build them with `./scripts/enter_isaac_ros_container false`
This will run all of the local dockerfiles without defaulting to the cached image on dockerhub.
After building and opening this container, run tests to make sure that this image doesn’t break anything.
Find the highest level image of this build with docker image list. The highest level image will be the largest image shown by docker image list, and will likely be isaac_ros_dev-x86-64.
Tag this image as `umnrobotics/<repo-name>:<image-layers-separated-by->_<HASH>`
At time of writing, we were tagging images as 'umnrobotics/isaac_ros3.1:x86_64-ros2_humble-realsense-deepstream-user-zed-umn-gazebo_d000f8df5f3859fd56c7459b2ad3a718'


If you are logged in to docker, running docker image push will push this image to the cloud, and you are done. If you changed the name of/created a new dockerhub repo, update BASE_DOCKER_REGISTRY_NAMES in /scripts/build_image.sh to reflect the new name.

After doing this, everything should be set up. Running ./scripts/enter_isaac_ros_container should default to the newly cached image, with all of the new changes.
When downloading the docker image on a separate device for the first time use “./scripts/enter_isaac_ros_container cached” to pull the new image. If it doesn’t do this, you may need to run docker image rm <old image name> to ensure that it pulls the new image.

**Basic Docker Commands:**


`docker login` – Prompts you to login to dockerhub. If maintaining team docker images, use the umnrobotics account.

`docker image list` – Shows all docker images that are built on your device

`docker ps – lists alls RUNNING` images

`docker kill <name (press tab)>` – Kills the specified image, stops it from running

`docker image rm <name (press tab)>` – deletes the specified image from your computer

`docker image prune` – Deletes headless / unused images. These images show as ‘<none>’ when running `docker image list

`docker system prune -a --volumes` – Deletes and clears ALL built images from the container

`docker image tag <local image tag> <new tag name>` – Essentially just renames a docker image

`docker image push <image name>` – Pushes local image to the cloud where it can be downloaded and used by others.
9 changes: 9 additions & 0 deletions scripts/build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ else
ARCH=arm64
fi

USE_CACHED_IMAGE=${1:-true}
if [ "${USE_CACHED_IMAGE}" = "false" ]; then
echo "Building image locally"
printf 'CONFIG_DOCKER_SEARCH_DIRS="$HOME/Lunabotics/src/isaac_ros/isaac_ros_common/scripts/../../../../docker"\n BASE_DOCKER_REGISTRY_NAMES=""\n'> ~/.isaac_ros_common-config
else
echo "Using remote image"
printf 'CONFIG_DOCKER_SEARCH_DIRS="$HOME/Lunabotics/src/isaac_ros/isaac_ros_common/scripts/../../../../docker"\n BASE_DOCKER_REGISTRY_NAMES="umnrobotics/isaac_ros3.1"\n'> ~/.isaac_ros_common-config
fi

if [ ! -f ${HOME}/Lunabotics/docker/deepstream/deepstream*.deb ]; then
ngc registry resource download-version nvidia/deepstream:7.0 --dest "${HOME}/Lunabotics/docker/deepstream" --file "*${ARCH}.deb" || echo You need to install ngc!
fi
Expand Down
6 changes: 4 additions & 2 deletions scripts/enter_isaac_ros_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ printf 'CONFIG_DOCKER_SEARCH_DIRS="$HOME/Lunabotics/src/isaac_ros/isaac_ros_comm
image_key="ros2_humble.realsense.deepstream.user.zed.umn.gazebo"
docker_arg="-v /usr/local/zed/resources:/usr/local/zed/resources -v $HOME/rosbags:/rosbags -v /usr/local/zed/settings:/usr/local/zed/settings"

if docker images | grep -q "${image_key}"; then
USE_CACHED_IMAGE=${1:-true}

if $USE_CACHED_IMAGE && docker images | grep -q "${image_key}"; then
echo "Image ${image_key} already exists"
else
echo "Building image ${image_key}"
bash ~/Lunabotics/scripts/build_image.sh
bash ~/Lunabotics/scripts/build_image.sh $USE_CACHED_IMAGE
fi

bash ~/Lunabotics/src/isaac_ros/isaac_ros_common/scripts/run_dev.sh -d ~/Lunabotics -i "${image_key}" -a "${docker_arg}" -v -b
66 changes: 3 additions & 63 deletions src/apriltag/apriltag/apriltag_location_nasa.urdf.xarco
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<?xml version="1.0"?>
<!--
THIS IS THE NASA KSC FIELD
TODO: These coordinates may need to be updated if official measurements are released.
TODO: These coordinates might need to be updated, check the official cosmic (ISU) field diagram.
Coordinate system is in meters
(0,0) is the bottom right corner of the map, (6.88, 5) is the top left.
-->


<root>
<!--
Tags in the starting zone.
This assumes that we are placing 2 tags on the wall.
-->
<!-- Tags in the starting zone. This assumes that we are placing 2 tags on the wall. -->

<link name="base_tag_1">
<parent link="base_link"/>
<visual>
Expand All @@ -38,61 +35,4 @@ This assumes that we are placing 2 tags on the wall.
</visual>
</link>



<!--
Tags in the berm area.
Goes Top left, Top right, Bottom left, Bottom right from tags 3-6
-->
<link name="berm_tag_3">
<parent link="base_link"/>
<visual>
<origin xyz="2.4 1 0.4" rpy="0 0 180"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="green">
<color rgba="0 1 0 1"/>
</material>
</visual>
</link>

<link name="berm_tag_4">
<parent link="base_link"/>
<visual>
<origin xyz="0.2 1 0.4" rpy="0 0 180"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="yellow">
<color rgba="1 1 0 1"/>
</material>
</visual>
</link>

<link name="berm_tag_5">
<parent link="base_link"/>
<visual>
<origin xyz="2.4 0.1 0.4" rpy="0 0 180"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="purple">
<color rgba="1 0 1 1"/>
</material>
</visual>
</link>

<link name="berm_tag_6">
<parent link="base_link"/>
<visual>
<origin xyz="0.2 0.1 0.4" rpy="0 0 180"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
</link>
</root>
64 changes: 2 additions & 62 deletions src/apriltag/apriltag/apriltag_location_ucf_bot.urdf.xarco
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
(0,0) is the bottom right corner of the map, (4.57, 8.14) is the top left.
-->


<root>
<!--
Tags in the starting zone.
This assumes that we are placing 2 tags on the wall.
-->
<!-- Tags in the starting zone. This assumes that we are placing 2 tags on the wall. -->

<link name="base_tag_1">
<parent link="base_link"/>
<visual>
Expand All @@ -37,61 +34,4 @@ This assumes that we are placing 2 tags on the wall.
</visual>
</link>



<!--
Tags in the berm area.
Goes Top left, Top right, Bottom left, Bottom right from tags 3-6
-->
<link name="berm_tag_3">
<parent link="base_link"/>
<visual>
<origin xyz="7.59 1.45 0.4" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="green">
<color rgba="0 1 0 1"/>
</material>
</visual>
</link>

<link name="berm_tag_4">
<parent link="base_link"/>
<visual>
<origin xyz="6.09 1.45 0.4" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="yellow">
<color rgba="1 1 0 1"/>
</material>
</visual>
</link>

<link name="berm_tag_5">
<parent link="base_link"/>
<visual>
<origin xyz="7.59 0.55 0.4" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="purple">
<color rgba="1 0 1 1"/>
</material>
</visual>
</link>

<link name="berm_tag_6">
<parent link="base_link"/>
<visual>
<origin xyz="6.09 0.55 0.4" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
</link>
</root>
64 changes: 2 additions & 62 deletions src/apriltag/apriltag/apriltag_location_ucf_top.urdf.xarco
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
(0,0) is the bottom right corner of the map, (4.57, 8.14) is the top left.
-->


<root>
<!--
Tags in the starting zone.
This assumes that we are placing 2 tags on the wall.
-->
<!-- Tags in the starting zone. This assumes that we are placing 2 tags on the wall. -->

<link name="base_tag_1">
<parent link="base_link"/>
<visual>
Expand All @@ -37,61 +34,4 @@ This assumes that we are placing 2 tags on the wall.
</visual>
</link>



<!--
Tags in the berm area.
Goes Top left, Top right, Bottom left, Bottom right from tags 3-6
-->
<link name="berm_tag_3">
<parent link="base_link"/>
<visual>
<origin xyz="7.59 4.02 0.4" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="green">
<color rgba="0 1 0 1"/>
</material>
</visual>
</link>

<link name="berm_tag_4">
<parent link="base_link"/>
<visual>
<origin xyz="6.09 4.02 0.4" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="yellow">
<color rgba="1 1 0 1"/>
</material>
</visual>
</link>

<link name="berm_tag_5">
<parent link="base_link"/>
<visual>
<origin xyz="7.59 3.12 0.4" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="purple">
<color rgba="1 0 1 1"/>
</material>
</visual>
</link>

<link name="berm_tag_6">
<parent link="base_link"/>
<visual>
<origin xyz="6.09 3.12 0.4" rpy="0 0 0"/>
<geometry>
<box size="0.1 0.1 0.1"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
</link>
</root>
37 changes: 2 additions & 35 deletions src/gazebo/ros_gz_description/models/NASA_field/model.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -22,57 +22,24 @@
</visual>
</link>

<!-- orintation like rule book, bottom field. plus x, plus y from bottom right-->
<!-- orientation like rule book, bottom field. plus x, plus y from bottom right-->

<frame name="bottom_right">
<pose>3.44 -2.5 0 0 0 0</pose>
</frame>

<!--
Tags in the starting zone.
This assumes that we are placing 2 tags on the wall.
-->
<!-- Tags in the starting zone. This assumes that we are placing 2 tags on the wall. -->
<include>
<uri>/src/gazebo/ros_gz_description/models/Apriltag36_11_00001</uri>
<pose relative_to='bottom_right'>-6.87 1 0.4 1.57 0 1.57</pose>
<name>AprilTag_1</name>
</include>


<include>
<uri>/src/gazebo/ros_gz_description/models/Apriltag36_11_00002</uri>
<pose relative_to='bottom_right'>-6.87 1.2159 0.4 1.57 0 1.57</pose>
<name>AprilTag_2</name>
</include>

<!--
Tags in the berm area.
Goes Top left, Top right, Bottom left, Bottom right from tags 3-6
Unused
-->
<!-- <include>
<uri>/src/gazebo/ros_gz_description/models/Apriltag36_11_00002</uri>
<pose relative_to='bottom_right'>-2.4 1 0.4 1.57 0 -1.57</pose>
<name>AprilTag_3</name>
</include>
<include>
<uri>/src/gazebo/ros_gz_description/models/Apriltag36_11_00003</uri>
<pose relative_to='bottom_right'>-0.2 1 0.4 1.57 0 -1.57</pose>
<name>AprilTag_4</name>
</include>
<include>
<uri>/src/gazebo/ros_gz_description/models/Apriltag36_11_00004</uri>
<pose relative_to='bottom_right'>-2.4 0.1 0.4 1.57 0 -1.57</pose>
<name>AprilTag_5</name>
</include>
<include>
<uri>/src/gazebo/ros_gz_description/models/Apriltag36_11_00005</uri>
<pose relative_to='bottom_right'>-0.2 0.1 0.4 1.57 0 -1.57</pose>
<name>AprilTag_6</name>
</include> -->

</model>
</sdf>
Loading

0 comments on commit ed4f5e8

Please sign in to comment.