Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN sudo apt-get update --fix-missing \
&& apt-get -y install bash-completion ros-$ROS_DISTRO-rmw-cyclonedds-cpp ros-$ROS_DISTRO-generate-parameter-library \
ros-$ROS_DISTRO-message-filters \
ros-$ROS_DISTRO-image-transport \
ros-$ROS_DISTRO-image-transport-py \
python3-pip pre-commit \
&& pip3 install numpy==1.26.4 --break-system-packages \
&& pip3 install --ignore-installed mediapipe --break-system-packages\
Expand Down
4 changes: 3 additions & 1 deletion human_detector/human_detector/human_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from rclpy.time import Time
from rclpy.lifecycle import LifecycleNode
from rclpy.lifecycle.node import LifecycleState, TransitionCallbackReturn
from image_transport_py import ImageTransport
from sensor_msgs.msg import CameraInfo, Image
from rclpy.qos_overriding_options import QoSOverridingOptions
from rclpy.qos import qos_profile_sensor_data
Expand Down Expand Up @@ -45,7 +46,8 @@ def on_configure(self, previous_state: LifecycleState):
self.initialize_sync_subscribers()

if self.parameters.publish_image_with_detected:
self.image_with_detected_human_pub = self.create_publisher(Image, "image_with_detected_human", 10)
self.image_transport = ImageTransport("compressed_image_with_detected_human_pub", "compressed")
self.image_with_detected_human_pub = self.image_transport.advertise("image_with_detected_human", 10)
self.timer = self.create_timer(1 / self.parameters.detected_human_transform_frequency, self.timer_callback)
self.timer.cancel()

Expand Down
2 changes: 2 additions & 0 deletions human_detector/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<exec_depend>cv_bridge</exec_depend>
<exec_depend>python3-opencv</exec_depend>
<exec_depend>message_filters</exec_depend>
<exec_depend>image_transport</exec_depend>
<exec_depend>image_transport_py</exec_depend>

<export>
<build_type>ament_python</build_type>
Expand Down