Path fixes etc

This commit is contained in:
Alex Davies 2024-09-19 11:09:24 -03:00
parent 78271404fb
commit a60a1784f7
4 changed files with 8 additions and 11 deletions

View File

@ -11,7 +11,7 @@ PACKAGE_DESCRIPTION:
multiline: true
MAINTAINER_NAME: No Reply
MAINTAINER_EMAIL: "{{MAINTAINER_NAME|slugify}}@spirirobotics.com"
MAINTAINER_EMAIL: "{{MAINTAINER_NAME|lower|replace(' ', '.')}}@spirirobotics.com"
LICENSE: BSD
#We use a custom launch script to ensure that rosrun logs to console and have it not accidently launch the master node itself, which can be hard to diagnose
LANGUAGES:
@ -22,12 +22,9 @@ LANGUAGES:
- Python
- CPP
RUN_COMMAND: rosrun {{PACKAGE_NAME}} {{"main.py" if 'Python' in LANGUAGES elif "CPP" in LANGAUGES "main"}}
RUN_COMMAND: rosrun {{ PACKAGE_NAME }} {{ "main.py" if 'Python' in LANGUAGES else "main" if "CPP" in LANGUAGES else "yourcommandGoes here" }}
HEALTHCHECK:
defualt: --start-period=60s --start-interval=1s CMD /ros_entrypoint.sh rostopic list
type: str
help: |
This health check command should return 0 when your service is running properly.
The default healthcheck just checks to see if we can reach the ROS master.
Providing a good health check is left as an excersize to the reader.
help: It's important to have a good health check. This health check just sees if we can talk to the ROS master

View File

@ -194,12 +194,12 @@ include_directories(
{% if "CPP" in LANGUAGES %}
## Declare a C++ executable
add_executable(talker src/main.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)
add_executable(main src/main.cpp)
target_link_libraries(main ${catkin_LIBRARIES})
{% endif %}
{%if "Python" in LANGUAGES%}
#Include a python command
catkin_install_python(PROGRAMS scripts/main.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

View File

@ -11,7 +11,7 @@ RUN apt-get install --yes python3-rosdep python3-rosinstall python3-rosinstall-g
WORKDIR /root/catkin_ws/src
COPY ./ .
COPY ./ {{PACKAGE_NAME}}
RUN apt-get clean
HEALTHCHECK {{HEALTHCHECK}}

View File

@ -8,7 +8,7 @@ services:
environment:
- "ROS_MASTER_URI=http://ros-master:11311"
volumes:
- ./:/root/catkin_ws/src/myproject
- ./:/root/catkin_ws/src/{{PROJECT_NAME}}
command: bash -c "tail -f /dev/null"
networks:
- sdk