Skip to content

Commit

Permalink
ci: fix broken ci (#57)
Browse files Browse the repository at this point in the history
* chore: fix mypi.ini and format

* docker: add option to keep launch file

* ci: dont remove launch file from image in ci

* ci: fix github yaml indentation
  • Loading branch information
HiroIshida authored Feb 1, 2025
1 parent 15a25c0 commit 7f3419e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
with:
push: false
tags: detic_ros:latest
build_args: INSTALL_JSK_PCL=false
build-args: | # for testing purposes only
INSTALL_JSK_PCL=false
KEEP_LAUNCH_FILES=true
- name: rostest
run: |
docker run --rm detic_ros:latest /bin/bash -i -c "source ~/.bashrc; rostest detic_ros test_node.test"
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM nvidia/cuda:11.2.2-runtime-ubuntu20.04
ARG KEEP_LAUNCH_FILES=false
ENV DEBIAN_FRONTEND=noninteractive
RUN rm /etc/apt/sources.list.d/cuda.list

Expand Down Expand Up @@ -98,7 +99,10 @@ RUN cd ~/detic_ws/src &&\
cd ~/detic_ws && catkin init && catkin build

# to avoid conflcit when mounting
RUN rm -rf ~/detic_ws/src/detic_ros/launch
RUN if [ "$KEEP_LAUNCH_FILES" = "false" ]; then \
rm -rf ~/detic_ws/src/detic_ros/launch; \
fi


########################################
########### ENV VARIABLE STUFF #########
Expand Down
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ignore_missing_imports = True
ignore_missing_imports = True
[mypy-std_msgs.*]
ignore_missing_imports = True
[mypy-std_srvs.*]
ignore_missing_imports = True
[mypy-jsk_recognition_msgs.*]
ignore_missing_imports = True
[mypy-cv2]
Expand Down
15 changes: 11 additions & 4 deletions node_script/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@
from typing import Optional

import rospy
import torch
from jsk_recognition_msgs.msg import LabelArray, VectorArray
from node_config import NodeConfig
from rospy import Publisher, Subscriber
from sensor_msgs.msg import Image
import torch
from std_srvs.srv import Empty, EmptyRequest, EmptyResponse
from wrapper import DeticWrapper

from detic_ros.msg import SegmentationInfo
from detic_ros.srv import DeticSeg, DeticSegRequest, DeticSegResponse
from detic_ros.srv import CustomVocabulary, CustomVocabularyRequest, CustomVocabularyResponse
from std_srvs.srv import Empty, EmptyRequest, EmptyResponse
from detic_ros.srv import (
CustomVocabulary,
CustomVocabularyRequest,
CustomVocabularyResponse,
DeticSeg,
DeticSegRequest,
DeticSegResponse,
)


class DeticRosNode:
Expand Down Expand Up @@ -129,6 +135,7 @@ def default_vocab_srv(self, req: EmptyRequest) -> EmptyResponse:
res = EmptyResponse()
return res


if __name__ == '__main__':
rospy.init_node('detic_node', anonymous=True)
node = DeticRosNode()
Expand Down

0 comments on commit 7f3419e

Please sign in to comment.