Skip to content

Commit

Permalink
Merge pull request #132 from mqcmd196/PR/gitsubmodule
Browse files Browse the repository at this point in the history
Remove old rosinstall and init submodule in cmake
  • Loading branch information
k-okada authored Jul 10, 2024
2 parents 66ad4d1 + ea22c82 commit 4653cf2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 36 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ catkin_package(
CATKIN_DEPENDS message_runtime
)

find_package(Git REQUIRED)
if (NOT EXISTS ${PROJECT_SOURCE_DIR}/python/coral_usb/posenet/pose_engine.py)
add_custom_target(posenet_update ALL
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive python/coral_usb/posenet
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
endif()

if (${catkin_virtualenv_VERSION} VERSION_LESS "0.6.1")
message(WARNING "Please install catkin_virtualenv>=0.6.1.")
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ source /opt/ros/melodic/setup.bash
mkdir -p ~/coral_ws/src
cd ~/coral_ws/src
git clone https://github.com/jsk-ros-pkg/coral_usb_ros.git
wstool init
wstool merge coral_usb_ros/fc.rosinstall
wstool update
rosdep install --from-paths . --ignore-src -y -r
cd ~/coral_ws
catkin init
Expand Down Expand Up @@ -219,9 +216,6 @@ source /opt/ros/noetic/setup.bash
mkdir -p ~/coral_ws/src
cd ~/coral_ws/src
git clone https://github.com/jsk-ros-pkg/coral_usb_ros.git
wstool init
wstool merge coral_usb_ros/fc.rosinstall
wstool update
rosdep install --from-paths . --ignore-src -y -r
cd ~/coral_ws
catkin init
Expand Down
17 changes: 5 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,19 @@ ARG ROS_DISTRO
RUN cd ~ && \
mkdir -p ros/${ROS_DISTRO}/src && \
cd ros/${ROS_DISTRO}/src && \
wstool init && \
wstool set coral_usb_ros https://github.com/jsk-ros-pkg/coral_usb_ros.git -v master --git -y && \
wstool up -j 2 && \
wstool merge -y coral_usb_ros/fc.rosinstall && \
if [ -f coral_usb_ros/fc.rosinstall.${ROS_DISTRO} ]; then \
wstool merge -y coral_usb_ros/fc.rosinstall.${ROS_DISTRO}; \
fi && \
wstool up -j 2
git clone https://github.com/jsk-ros-pkg/coral_usb_ros && \
if [ ${ROS_DISTRO} = "kinetic" ] && [ -f coral_usb_ros/fc.rosinstall.${ROS_DISTRO} ]; then \
wstool init && wstool merge -y coral_usb_ros/fc.rosinstall.${ROS_DISTRO} && wstool up -j 2; \
fi

RUN if [ ${ROS_DISTRO} != "noetic" ]; then \
pip install dlib==19.21.1; \
pip install fcn chainercv chainer==6.7.0 protobuf==3.18.0; \
fi

# /opt/ros/${ROS_DISTRO}/share can be changed after rosdep install, so we run it 3 times.
RUN rosdep update --include-eol-distros && \
apt-get update && \
for i in $(seq 3); do \
rosdep install --rosdistro ${ROS_DISTRO} -r -y -i --from-paths /opt/ros/${ROS_DISTRO}/share ~/ros/${ROS_DISTRO}/src; \
done && \
rosdep install --rosdistro ${ROS_DISTRO} -r -y -i --from-paths /opt/ros/${ROS_DISTRO}/share ~/ros/${ROS_DISTRO}/src || true && \
rm -rf /var/lib/apt/lists/*

ARG ROS_DISTRO
Expand Down
4 changes: 0 additions & 4 deletions fc.rosinstall

This file was deleted.

14 changes: 0 additions & 14 deletions fc.rosinstall.melodic

This file was deleted.

1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<build_depend>jsk_topic_tools</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>git</build_depend>
<exec_depend>jsk_perception</exec_depend>
<exec_depend>message_runtime</exec_depend>
<exec_depend>python3-rospkg-modules</exec_depend>
Expand Down

0 comments on commit 4653cf2

Please sign in to comment.