Compare commits

...

6 Commits

Author SHA1 Message Date
Alex Davies 3c4e35938f Added recomended extentions 2024-09-13 14:05:06 -03:00
Alex Davies e59d948054 Update devcontainers 2024-09-13 12:52:03 -03:00
Alex Davies f93cbb5a28 Fix tasks.json 2024-09-13 12:50:39 -03:00
Alex Davies 4e43b760e7 Fix copy source 2024-09-13 12:49:16 -03:00
Alex Davies dbb498c78a Added re-aply task 2024-09-13 12:47:50 -03:00
Alex Davies dd68457bda Several small fixes 2024-09-13 12:40:45 -03:00
6 changed files with 30 additions and 14 deletions

View File

@ -4,6 +4,7 @@ _answers_file: .copier/answers.service-ros1-catkin.yml
RUN_COMMAND: /launch video_stream_opencv stereo_cameras.launch port_camera_device:="/dev/video0" starboard_camera_device:="/dev/video1"
#Source can be either a local folder or a git repo, if you path starts with `git+`
SOURCE: ./
PROJECT_NAME: My sample project
#This just checks if it can contact the ROS master, ideally we'd check for something specific to your ROS node.
#This can be tricky when you set ROS node paramaters from environment variables or the like, you may need to write a shell script.
# I'll try to make auto-generating health checks a bit easier in the future.

View File

@ -1,6 +1,8 @@
{
"workspaceFolder": "/root/catkin_ws/src/myproject",
"name": "ros1-catkit-devcontainer",
"dockerFile": "../Dockerfile",
"dockerComposeFile": "../docker-compose.yml",
"service": "ros1-catkin-test",
"customizations": {
"vscode": {
"extensions": [
@ -12,6 +14,5 @@
}
},
"forwardPorts": [
],
"postCreateCommand": "/bin/bash -c 'source /opt/ros/noetic/setup.bash && catkin_make install'"
]
}

5
src/.vscode/extentions.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"recommendations": [
"ms-vscode-remote.remote-containers"
]
}

View File

@ -4,9 +4,14 @@
"version": "2.0.0",
"tasks": [
{
"label": "Update templates ",
"label": "Update from templates ",
"type": "shell",
"command": "find .copier/ -type f -exec copier update --skip-answered -a {} \\;"
},
{
"label": "Re-apply templates and edit answers ",
"type": "shell",
"command": "find .copier/ -type f -exec copier recopy -a {} \\;"
}
]
}

View File

@ -10,9 +10,10 @@ RUN apt-get install --yes python3-rosdep python3-rosinstall python3-rosinstall-g
WORKDIR /root/catkin_ws/src
#Copy source into the docker image
{% if SOURCE.startswith("git+") %}
RUN git clone {{source}}
{% elif source %}
RUN git clone {{SOURCE}}
{% elif SOURCE %}
COPY {{SOURCE}} .
{% endif %}
@ -23,16 +24,8 @@ RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && rosdep install --from-pat
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin_make"
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin_make install"
# # Stage 2: Runtime Stage
# FROM git.spirirobotics.com/spiri/services-ros1-core:main
#
# # Copy only the built artifacts from the previous stage
# COPY --from=builder /root/catkin_ws/devel /root/catkin_ws/devel
# Set the working directory
WORKDIR /root/catkin_ws
RUN apt-get clean
HEALTHCHECK {{HEALTHCHECK}}

11
src/README.md.jinja Normal file
View File

@ -0,0 +1,11 @@
# {{PROJECT_NAME}}
### Spiri SDK and development workflows
This project is intended to be used as part of the Spiri Robotics SDK
with VSCode and devcontainers.
Please refer to the spiri SDK documentation for a quickstart guide on
how to develop this project.