Skip to content

Commit

Permalink
humble fixs
Browse files Browse the repository at this point in the history
  • Loading branch information
gbr1 committed Aug 6, 2023
1 parent 497118b commit 79aaf97
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 8 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# edgeimpulse_ros

ROS2 wrapper for Edge Impulse on Linux.
ROS2 Humble wrapper for Edge Impulse on Linux.

![ezgif-4-3cda6ac695](https://user-images.githubusercontent.com/9216366/193153736-fccd9451-2277-42f2-8141-6027a10f0245.gif)

Expand Down Expand Up @@ -62,7 +62,6 @@ Here you find some prebuilt models: [https://github.com/gbr1/edgeimpulse_example

## 6. Known issues

- this wrapper works on foxy, galactic and humble are coming soon (incompatibility on vision msgs by ros-perception)
- if you use a classification model, topic results is empty
- you cannot change color of bounding boxes (coming soon)
- other types (imu and sound based ml) are unavailable
Expand Down
Binary file added edgeimpulse_ros/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file removed edgeimpulse_ros/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 6 additions & 4 deletions edgeimpulse_ros/image_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,19 @@ def classify_callback(self):

# object with hypthothesis
obj_hyp = ObjectHypothesisWithPose()
obj_hyp.id = bb['label'] #str(self.ei_classifier.labels.index(bb['label']))
obj_hyp.score = bb['value']
obj_hyp.hypothesis.class_id = bb['label'] #str(self.ei_classifier.labels.index(bb['label']))
obj_hyp.hypothesis.score = bb['value']
obj_hyp.pose.pose.position.x = float(centerX)
obj_hyp.pose.pose.position.y = float(centerY)
result_msg.results.append(obj_hyp)

# bounding box
result_msg.bbox.center.x = float(centerX)
result_msg.bbox.center.y = float(centerY)
result_msg.bbox.center.position.x = float(centerX)
result_msg.bbox.center.position.y = float(centerY)
result_msg.bbox.center.theta = 0.0
result_msg.bbox.size_x = float(bb['width'])
result_msg.bbox.size_y = float(bb['height'])
result_msg.id = bb['label']


results_msg.detections.append(result_msg)
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>edgeimpulse_ros</name>
<version>0.0.4</version>
<version>0.0.5</version>
<description>ROS2 wrapper for Edge Impulse</description>
<maintainer email="[email protected]">gbr1</maintainer>
<license>Apache 2.0</license>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
submodules = 'edgeimpulse_ros/submodules'
setup(
name=package_name,
version='0.0.4',
version='0.0.5',
packages=[package_name, submodules],
data_files=[
('share/ament_index/resource_index/packages',
Expand Down

0 comments on commit 79aaf97

Please sign in to comment.