Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU-accelerated obstacle detection #620

Merged
merged 229 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
bba2188
added normed center offset functionality
MarshallVielmetti Sep 26, 2023
1a274ed
add starter files for second cam tag detection node
alisonryckman Sep 26, 2023
ce56c53
Wrote detection and hit updating 4 long range tags
MarshallVielmetti Sep 26, 2023
1ce57d1
updated Perception README.md
MarshallVielmetti Sep 27, 2023
f14d6fb
Created message types
MarshallVielmetti Sep 27, 2023
1ee5d9f
fixed tags issue and added to CmakeLists
MarshallVielmetti Sep 27, 2023
de3fd1e
added tag publishing logic
MarshallVielmetti Sep 27, 2023
1dc1f1d
replaced C style casting with static casts
MarshallVielmetti Sep 27, 2023
977e252
added marked image publishing
MarshallVielmetti Sep 27, 2023
35c9bf2
Removed abbreviation
MarshallVielmetti Sep 30, 2023
1544d2f
Merge branch 'master' of github.com:umrover/mrover-ros into percep-se…
alisonryckman Oct 1, 2023
51c664b
add wrapper node
alisonryckman Oct 1, 2023
b2c72d0
add detector files
alisonryckman Oct 1, 2023
f05e396
x
AjaySum Oct 1, 2023
947417d
save
qhdwight Sep 26, 2023
5ab8d47
Clean starting point
qhdwight Oct 2, 2023
fa185e4
Cleanup cmake
qhdwight Oct 2, 2023
5b53847
Add starter files
qhdwight Oct 2, 2023
3442e34
Disambiguate tag detector and obj detector config, add more starter s…
qhdwight Oct 2, 2023
ff8bb2d
Add comments
qhdwight Oct 2, 2023
7629bce
created long_range_cam pch
MarshallVielmetti Oct 3, 2023
d522377
move tag detectors into their own folders and added long range cam vi…
alisonryckman Oct 3, 2023
8229b24
merge conflict res
alisonryckman Oct 3, 2023
90ae8d3
merged in fillImageMessage
AjaySum Oct 5, 2023
ef2e765
Began work on object detector
MarshallVielmetti Oct 11, 2023
e70dc0c
Add cmake
jbrhm Oct 11, 2023
716eeba
Merge remote-tracking branch 'origin/master' into percep-second-cam
jbrhm Oct 11, 2023
836961e
Fix cmake
jbrhm Oct 11, 2023
20109b7
Getting Matrix Results
jbrhm Oct 11, 2023
9996b7c
Data Gathered Just Need to Create and Publish Msg
jbrhm Oct 12, 2023
7272be8
Object msg - still needs publisher
jbrhm Oct 12, 2023
133b6e2
Needs work with onnx
jbrhm Oct 13, 2023
8fbb215
imread error and linker error
jbrhm Oct 17, 2023
743226e
Merge remote-tracking branch 'origin/master' into percep/obj-detect
qhdwight Oct 17, 2023
20c3693
Can detect water bottle
jbrhm Oct 17, 2023
154151d
Static Bottle Detection Working
jbrhm Oct 17, 2023
818ce3c
Working camera detection
jbrhm Oct 17, 2023
9adc860
Make Needs to be Updated
jbrhm Oct 19, 2023
112b13f
Segmentation Error
jbrhm Oct 19, 2023
b74bf90
get camera images with gstreamer, add nodelet to cmakelists
umroverPerception Oct 22, 2023
a8a8147
add bearing function defs
alisonryckman Oct 24, 2023
10ed461
fix cmakelists conflict
alisonryckman Oct 24, 2023
2e63217
Pre ZED Testing
jbrhm Oct 24, 2023
d58cb7b
Merge remote-tracking branch 'origin/master' into percep/obj-detect
qhdwight Oct 24, 2023
d6dd4fe
ZED Object Detection (Needs Speeding up)
jbrhm Oct 24, 2023
a0a88c6
Image Detections Published Properly
jbrhm Oct 24, 2023
0bf3562
Publish Nav Data
jbrhm Oct 24, 2023
488d9f7
fix cmake and bearing starter code
umroverPerception Oct 25, 2023
d3c6d50
add nodelet plugins
umroverPerception Oct 26, 2023
a007ea2
Merge with master and fix up a few things
qhdwight Oct 26, 2023
49219f8
NOT WORKING BUT TRIED
MarshallVielmetti Oct 26, 2023
1b219ea
Add cuda file
qhdwight Oct 29, 2023
2d6346a
edit object msg type
alisonryckman Oct 29, 2023
5471f2f
Mid Tensor Development
jbrhm Oct 29, 2023
f14dd0f
Merge branch 'percep/obj-detect' of github.com:umrover/mrover-ros int…
jbrhm Oct 29, 2023
f7ef94f
Working on Inference Class
jbrhm Oct 30, 2023
3d5e10b
working greyscale stream with ros
umroverPerception Oct 30, 2023
22036a9
switch image type from grey -> bgra
umroverPerception Oct 30, 2023
5789ac0
Constructor blocked: Didn't adjust for comments: Unsure about some of…
jbrhm Oct 31, 2023
be76f23
I'm confused
jbrhm Oct 31, 2023
e731088
DEATH TO THE RED SQUIGGLES: Forward Pass done. Need to parse output
jbrhm Nov 1, 2023
718cb1a
Wrote Parser
jbrhm Nov 2, 2023
ac14193
implemented part of getTagBearing()
lorraineqiu828 Nov 2, 2023
a12c347
Implementing Mats
jbrhm Nov 3, 2023
33d2fb4
Remove Until Built
jbrhm Nov 3, 2023
6e8c3c0
Pre ONNX Environment setup
jbrhm Nov 3, 2023
5659896
Builds: Removed ReadProtoTensor
jbrhm Nov 4, 2023
e958479
Inference.cu builds
jbrhm Nov 4, 2023
6fb7fc6
Pointer Errors with cv::Mat
jbrhm Nov 4, 2023
d235b14
Added NVINFER && NVONNXPARSER to CMake
jbrhm Nov 5, 2023
28fc946
fixed segfaults, image wrong format
umroverPerception Nov 6, 2023
0a4db39
tag detector works
umroverPerception Nov 6, 2023
6dc1e10
Everything compiles
jbrhm Nov 7, 2023
dc24862
cuda_runtime_api.h' file not found
jbrhm Nov 7, 2023
2dba81c
CUDA COMPILING ::::::))))))))
jbrhm Nov 8, 2023
1f90062
Code Compiles with Wrapper Constructor called
jbrhm Nov 8, 2023
13c10d4
No More Seg Fault
jbrhm Nov 8, 2023
f214add
Something is up with running the model
jbrhm Nov 9, 2023
383760a
SEG FAULT :))))))
jbrhm Nov 9, 2023
1843aa9
sadness
jbrhm Nov 10, 2023
cccf7b0
builds correctly now
lorraineqiu828 Nov 12, 2023
2375874
add launch
umroverPerception Nov 14, 2023
b6bd514
Merge branch 'percep-second-cam' of github.com:umrover/mrover-ros int…
umroverPerception Nov 14, 2023
56c6f39
Create and Parse Engine File
jbrhm Nov 15, 2023
f065a63
seg fault on Cuda stream sad :(((((((
jbrhm Nov 16, 2023
90293cb
I FORGET WHAT THESE CHANGES ARE
jbrhm Nov 16, 2023
243d590
Initia changes
qhdwight Nov 16, 2023
2e719a9
Minor changeS
qhdwight Nov 17, 2023
5502240
Null Ptr :(((((((
jbrhm Nov 17, 2023
4dcfd13
Get rid of uneeded mat
qhdwight Nov 17, 2023
025af00
Clean up includes, refactor allocation of bindings, make inference fu…
qhdwight Nov 17, 2023
432c22e
Trying
jbrhm Nov 18, 2023
bc072bc
Cleanup file names, use ROS as the logger
qhdwight Nov 18, 2023
f996b2d
initial files
Emerson-Ramey Nov 19, 2023
a75a763
Bruh moment doesn't compile moment :(
jbrhm Nov 19, 2023
8de6b3f
Oops
qhdwight Nov 19, 2023
e7f7e9e
camera shouldn't crash
emmalinhart Dec 1, 2023
4f17971
updated tag bearing function
emmalinhart Dec 3, 2023
45ed4af
LETS GOO TENSORRT WORKING, PARSING WORKING, DEBUG SHOWING WORKING :))…
qhdwight Dec 7, 2023
b2027cf
Publish Nav Data and Optimized
qhdwight Dec 7, 2023
63f2ace
Parsing Dimensions + Names :))
qhdwight Dec 7, 2023
85be079
Not finished Tidying
qhdwight Dec 7, 2023
57adace
Cleaned Code
qhdwight Dec 7, 2023
7dbe7ff
Parsing point cloud 2 image
qhdwight Dec 7, 2023
aa1e693
Update LFS files to track NN files
qhdwight Dec 7, 2023
e3f5a9b
Post engine fiasco Changes
jbrhm Dec 12, 2023
9eb1d6a
fix build
alisonryckman Jan 5, 2024
f4202d5
Merge branch 'master' into ebr/new-states
Emerson-Ramey Jan 8, 2024
52d5763
outline changes for new states
Emerson-Ramey Jan 9, 2024
023d79d
New Ubuntu
jbrhm Jan 12, 2024
72160d9
Rescaled Pixel Grab
jbrhm Jan 12, 2024
2324c79
commented and builds
jbrhm Jan 14, 2024
6f2674f
Tested
jbrhm Jan 14, 2024
1670a68
Merge branch 'percep/obj-detect' of github.com:umrover/mrover-ros int…
alisonryckman Jan 16, 2024
7ec7957
Immediate and Permanent Thresholding on DetectedObject
jbrhm Jan 17, 2024
fa6a6f0
wrote mLongRangeTagsPub
enternal-L Jan 18, 2024
65e776f
Merge remote-tracking branch 'origin/integration' into percep/obj-detect
qhdwight Jan 18, 2024
e722684
Working IRL
jbrhm Jan 19, 2024
da1259d
Merge remote-tracking branch 'origin/integration' into percep/obj-detect
qhdwight Jan 19, 2024
ae84400
Changes for obj detect working in sim
qhdwight Jan 19, 2024
0bbb337
I need to charge my battery
jbrhm Jan 19, 2024
f9e51bf
Spiral Pattern :)
jbrhm Jan 20, 2024
84a9b69
Fixed Spiral
jbrhm Jan 20, 2024
656f357
Cleaned up TODO's and added filesystem
jbrhm Jan 20, 2024
6867316
Cleaning up
jbrhm Jan 20, 2024
cce3b3e
Code Cleaned Up! :)))
jbrhm Jan 20, 2024
704e314
update todos
Emerson-Ramey Jan 21, 2024
9bc75e7
Merge branch 'master' into ebr/new-states
Emerson-Ramey Jan 21, 2024
099e354
Cleaned up comments and Tested
jbrhm Jan 21, 2024
6bfcae6
progress on TODOs
sbarstys Jan 21, 2024
f51c02d
add udev rule for usb cam
alisonryckman Jan 22, 2024
059aed1
Merge remote-tracking branch 'origin/integration' into ebr/new-states
qhdwight Jan 23, 2024
d6abfe9
Update name
qhdwight Jan 23, 2024
34ae229
Merge remote-tracking branch 'origin/integration' into percep/obj-detect
qhdwight Jan 23, 2024
5fc95b9
Picture Taking :))))
jbrhm Jan 23, 2024
6bc9b1a
Merge Conflicts
jbrhm Jan 23, 2024
13d3fe0
Removed Image_Capture C++ Infrastructure
jbrhm Jan 23, 2024
240848e
Get rid of print statement
jbrhm Jan 23, 2024
eda4a56
Merge branch 'integration' into ebr/new-states
Emerson-Ramey Jan 23, 2024
c35561f
change to MALLET
Emerson-Ramey Jan 24, 2024
8ee12e7
edit search and waypoint
Emerson-Ramey Jan 24, 2024
aa08599
Merge branch 'percep/obj-detect' of github.com:umrover/mrover-ros int…
alisonryckman Jan 25, 2024
0da4475
Merge remote-tracking branch 'origin/integration' into percep/obj-detect
qhdwight Jan 25, 2024
22176e1
Fixed CMakelists.txt
jbrhm Jan 25, 2024
ca32c2e
Merge remote-tracking branch 'origin/integration' into ebr/new-states
umroverPerception Jan 25, 2024
b97bc64
approach object (mallet) working
umroverPerception Jan 26, 2024
0b2f8c8
New Changes UNTESTED
jbrhm Jan 26, 2024
640550a
Merge branch 'percep/obj-detect' of github.com:umrover/mrover-ros int…
alisonryckman Jan 26, 2024
987155a
added target coord calculations
AjaySum Jan 26, 2024
6e92496
added target coord calculations
AjaySum Jan 26, 2024
a12aebb
add both classes
alisonryckman Jan 26, 2024
1cdc561
update to approach water bottle too
Emerson-Ramey Jan 27, 2024
e006721
fix bearing calc
alisonryckman Jan 27, 2024
3eb039b
navigation ready for long range testing
ankithu Jan 27, 2024
99cf3bb
merge + minor changes to demo long range cam
ankithu Jan 27, 2024
ae7a3fb
Testing New Models
jbrhm Jan 27, 2024
16e4b13
max hit count
ankithu Jan 28, 2024
bf08fc5
time threshold check for LongRangeTagData
sbarstys Jan 28, 2024
0a5cef5
fix mypy errors
ankithu Jan 28, 2024
7085bb6
More data
jbrhm Jan 28, 2024
f9ccb5e
Model Changes
jbrhm Jan 29, 2024
5b5f4f1
merge long range with new states
alisonryckman Jan 30, 2024
b9d6957
remove mains from percep nodelets
alisonryckman Jan 30, 2024
34818a9
nav includes
alisonryckman Jan 30, 2024
92379ab
add transtions in navigation.py
umroverPerception Jan 30, 2024
dcae199
fix image input to work in sim
alisonryckman Jan 30, 2024
9719868
Merge branch 'ebr/new-states' of github.com:umrover/mrover-ros into e…
alisonryckman Jan 30, 2024
ada1a1f
Changes to zed Wrapper
jbrhm Jan 30, 2024
aecdb02
merge new states branch
alisonryckman Jan 30, 2024
d5da7aa
merge new states
alisonryckman Jan 31, 2024
7e36572
change hit counts + nav tf frame names
alisonryckman Feb 1, 2024
6077876
Pre Refactoring
jbrhm Feb 2, 2024
249bec0
Some minor refactoring
jbrhm Feb 2, 2024
beb7b9d
refactoring
jbrhm Feb 2, 2024
2e642cb
refactoring
jbrhm Feb 2, 2024
47428af
Removed Refactoring Bugs
jbrhm Feb 3, 2024
30e9dce
COLORS
jbrhm Feb 3, 2024
01d1b41
Loop Profiler
jbrhm Feb 4, 2024
9f41865
Cleaned up Image Capture
jbrhm Feb 6, 2024
298d32f
updates
jbrhm Feb 6, 2024
ff2d351
Merge remote-tracking branch 'origin/integration' into percep/obj-detect
qhdwight Feb 8, 2024
988bf77
Remove long range stuff from this PR
qhdwight Feb 8, 2024
33cc95f
Mostly style changes
qhdwight Feb 8, 2024
f127e22
Undo formatting in tag detector
qhdwight Feb 8, 2024
af12b8d
Quintin Told me too
jbrhm Feb 8, 2024
b91bd2c
Ros Params
umroverPerception Feb 8, 2024
33c2274
Fixing ROS Params
jbrhm Feb 9, 2024
b20cc07
Added Assert
umroverPerception Feb 9, 2024
bc331c2
Thread Not DYING :(((((((
jbrhm Feb 10, 2024
6f8c9d1
Merge remote-tracking branch 'refs/remotes/origin/percep/obj-detect' …
jbrhm Feb 10, 2024
94d656a
WIP Working on directories
jbrhm Feb 10, 2024
7edf84a
More Clean up
jbrhm Feb 11, 2024
a7cb1b7
Remove starter project changes
jbrhm Feb 11, 2024
e840182
Delete starter_project/teleop/src/router/index.js
jbrhm Feb 11, 2024
0ee3f0e
Delete starter_project/teleop/src/index.html
jbrhm Feb 11, 2024
3128092
Delete starter_project/teleop/src/components/MenuButton.vue
jbrhm Feb 11, 2024
cd23e4d
Delete starter_project/teleop/src/app.js
jbrhm Feb 11, 2024
0d27810
Delete starter_project/teleop/src/components/Menu.vue
jbrhm Feb 11, 2024
a4740a7
Delete starter_project/teleop/src/components/DriveControls.vue
jbrhm Feb 11, 2024
1d403c5
Delete starter_project/teleop/src/App.vue
jbrhm Feb 11, 2024
3624874
Delete starter_project/teleop/package.json
jbrhm Feb 11, 2024
6b105fb
Delete starter_project/teleop/gui_starter.sh
jbrhm Feb 11, 2024
6c71aca
Delete starter_project/teleop/babel.config.js
jbrhm Feb 11, 2024
b522f11
Delete starter_project/teleop/README.md
jbrhm Feb 11, 2024
5118686
Delete starter_project/autonomy/config/starter_project.world
jbrhm Feb 11, 2024
407e472
Delete starter_project/autonomy/config/starter_project.rviz
jbrhm Feb 11, 2024
f90ef42
Delete starter_project/autonomy/config/soil_normal.png
jbrhm Feb 11, 2024
896b729
Delete starter_project/autonomy/config/soil_base.png
jbrhm Feb 11, 2024
6a49a11
Delete src/perception/tag_detector/zed/tag_detector.threshold.cpp
jbrhm Feb 11, 2024
0f67990
Delete src/preload/format
jbrhm Feb 11, 2024
63f3848
Delete src/perception/tag_detector/zed/tag_detector.processing.cpp
jbrhm Feb 11, 2024
7fc3486
Delete src/perception/tag_detector/zed/tag_detector.hpp
jbrhm Feb 11, 2024
29ac531
Delete src/perception/tag_detector/zed/tag_detector.cpp
jbrhm Feb 11, 2024
bf460bc
Delete src/perception/tag_detector/zed/pch.hpp
jbrhm Feb 11, 2024
098f007
Delete config/DetectorParams.cfg
jbrhm Feb 11, 2024
1c188d7
Delete config/navigation.yaml
jbrhm Feb 11, 2024
2872390
Delete config/TagDetectorParams.cfg
jbrhm Feb 11, 2024
921597c
Delete plugins/tag_detector_plugin.xml
jbrhm Feb 11, 2024
087d8a8
Delete scripts/debug_course_publisher.py
jbrhm Feb 11, 2024
85fb4af
Delete src/perception/tag_detector/README.md
jbrhm Feb 11, 2024
9191442
Merge remote-tracking branch 'origin/integration' into percep/obj-detect
qhdwight Feb 12, 2024
6207ad8
Revert files that should not have been changed
qhdwight Feb 12, 2024
cc5b00d
Minor changes
qhdwight Feb 12, 2024
489ffdd
Merge remote-tracking branch 'origin/integration' into percep/obj-detect
umroverPerception Feb 12, 2024
e9996e3
Fixed Frames
jbrhm Feb 16, 2024
22852a6
Merge branch 'percep/obj-detect' of github.com:umrover/mrover-ros int…
jbrhm Feb 18, 2024
35f529e
baja.onnx
jbrhm Feb 18, 2024
aab6bb0
Merge remote-tracking branch 'origin/integration' into percep/obj-detect
qhdwight Feb 20, 2024
eb6781c
Changes from Baja, rename class names to be lowercase, publish to cor…
qhdwight Feb 20, 2024
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
11 changes: 10 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
text=auto
# Image files
*.png filter=lfs diff=lfs merge=lfs -text
# Model files
*.dae filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.stl filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
# Neural network files
*.pt filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.engine filter=lfs diff=lfs merge=lfs -text
# Model files
*.glb filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
# Packages
*.deb filter=lfs diff=lfs merge=lfs -text
# Program files
ansible/roles/esw/files/bin/fdcanusb_daemon filter=lfs diff=lfs merge=lfs -text
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ set(MROVER_MESSAGE_DEPENDENCIES

set(MROVER_PARAMETERS
config/DetectorParams.cfg
config/ObjectDetectorParams.cfg
)

set(MROVER_CMAKE_INCLUDES
Expand Down Expand Up @@ -172,6 +173,16 @@ if (CUDA_FOUND)
endif ()

if (ZED_FOUND)
mrover_add_nodelet(object_detector src/perception/object_detector/*.c* src/perception/object_detector src/perception/object_detector/pch.hpp)
mrover_nodelet_link_libraries(object_detector PRIVATE opencv_core opencv_dnn opencv_imgproc lie nvinfer nvonnxparser tbb)
mrover_nodelet_defines(object_detector
__CUDA_INCLUDE_COMPILER_INTERNAL_HEADERS__ # Eigen includes some files it should not, ignore
)
# TODO(john): Update object detector to use new API
target_compile_options(object_detector_nodelet PRIVATE -Wno-deprecated-declarations)
# Temporary
mrover_nodelet_link_libraries(object_detector PRIVATE opencv_imgcodecs opencv_highgui)

mrover_add_nodelet(zed src/perception/zed_wrapper/*.c* src/perception/zed_wrapper src/perception/zed_wrapper/pch.hpp)
mrover_nodelet_include_directories(zed ${ZED_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS})
mrover_nodelet_link_libraries(zed ${ZED_LIBRARIES} ${SPECIAL_OS_LIBS} lie)
Expand Down
10 changes: 10 additions & 0 deletions config/ObjectDetectorParams.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python3
PACKAGE = "mrover"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

# TODO(percep/obj-detector): add parameters

exit(gen.generate(PACKAGE, "object_detector", "ObjectDetectorParams"))
16 changes: 8 additions & 8 deletions config/simulator/simulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ objects:
- type: urdf
name: rover
uri: package://mrover/urdf/rover/rover.urdf.xacro
translation: [ 0, 0, 0.5 ]
translation: [0, 0, 0.5]
- type: urdf
name: world
uri: package://mrover/urdf/world/world.urdf.xacro
Expand All @@ -13,28 +13,28 @@ objects:
- type: urdf
name: tag_1
uri: package://mrover/urdf/world/tag_1.urdf.xacro
translation: [ 15, -14, 2.4 ]
translation: [15, -14, 2.4]
- type: urdf
name: hammer
uri: package://mrover/urdf/world/hammer.urdf.xacro
translation: [ 8, 7, 0.6 ]
translation: [5, 2, 0.7]
- type: urdf
name: bottle
uri: package://mrover/urdf/world/bottle.urdf.xacro
translation: [ -6.25, 10.5, 0.3 ]
translation: [-6.25, 10.5, 0.3]
- type: urdf
name: rock1
uri: package://mrover/urdf/world/rock.urdf.xacro
translation: [ 2, -2, 0.1 ]
translation: [2, -2, 0.1]
- type: urdf
name: rock2
uri: package://mrover/urdf/world/rock.urdf.xacro
translation: [ 7, -6, 0.2 ]
translation: [7, -6, 0.2]
- type: urdf
name: rock3
uri: package://mrover/urdf/world/rock.urdf.xacro
translation: [ 8, -10, 1 ]
translation: [8, -10, 1]
- type: urdf
name: rock4
uri: package://mrover/urdf/world/rock.urdf.xacro
translation: [ 9, -2, 0.2 ]
translation: [9, -2, 0.2]
3 changes: 3 additions & 0 deletions data/yolov8n_mallet_bottle_better.onnx
Git LFS file not shown
13 changes: 11 additions & 2 deletions launch/perception.launch
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
<launch>
<arg name="run_tag_detector" default="true" />
<arg name="run_object_detector" default="true" />

<!-- Nodelet to detect AR tags and publish them to the TF tree -->
<node if="$(arg run_tag_detector)"
pkg="nodelet" type="nodelet" name="tag_detector"
pkg="nodelet" type="nodelet" name="zed_tag_detector"
args="load mrover/TagDetectorNodelet nodelet_manager" output="screen" />
</launch>

<node if="$(arg run_tag_detector)"
pkg="nodelet" type="nodelet" name="long_range_tag_detector"
args="load mrover/LongRangeTagDetectorNodelet nodelet_manager" output="screen" />

<node if="$(arg run_object_detector)"
pkg="nodelet" type="nodelet" name="object_detector" respawn="true"
args="load mrover/ObjectDetectorNodelet perception_nodelet_manager" output="screen" />
</launch>
1 change: 1 addition & 0 deletions launch/zed.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<arg name="use_builtin_visual_odom" default="false" />

<rosparam command="load" file="$(find mrover)/config/perception.yaml" />

<node pkg="nodelet" type="nodelet" name="zed_nodelet" respawn="true"
args="load mrover/ZedNodelet nodelet_manager" output="screen">
<param name="use_builtin_visual_odom" value="$(arg use_builtin_visual_odom)" />
Expand Down
9 changes: 8 additions & 1 deletion launch/zed_test.launch
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
<arg name="run_rqt_tf_tree" default="true" />

<arg name="run_tag_detector" default="true" />
<arg name="run_object_detector" default="true" />
<arg name="use_builtin_visual_odom" default="false" />

<arg name="obj_increment_weight" default="3" />
<arg name="obj_decrement_weight" default="1" />
<arg name="obj_hitcount_threshold" default="50" />
<arg name="obj_hitcount_max" default="500" />

<include file="$(find mrover)/launch/zed.launch">
<arg name="use_builtin_visual_odom" value="$(arg use_builtin_visual_odom)" />
</include>

<include file="$(find mrover)/launch/perception.launch">
<arg name="run_tag_detector" value="$(arg run_tag_detector)" />
<arg name="run_object_detector" value="$(arg run_object_detector)" />
</include>

<group if="$(arg run_rviz)">
Expand All @@ -30,4 +37,4 @@

<node pkg="tf" type="static_transform_publisher" name="base_link_publisher"
args="1 0 0 0 0 0 map base_link 100" />
</launch>
</launch>
4 changes: 0 additions & 4 deletions msg/DetectedObject.msg

This file was deleted.

3 changes: 0 additions & 3 deletions msg/DetectedObjectType.msg

This file was deleted.

3 changes: 0 additions & 3 deletions msg/LongRangeTag.msg

This file was deleted.

1 change: 0 additions & 1 deletion msg/LongRangeTags.msg

This file was deleted.

12 changes: 6 additions & 6 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<!-- Example: -->
<!-- <author email="[email protected]">Jane Doe</author> -->


<!-- The *depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
Expand Down Expand Up @@ -78,9 +77,10 @@

<!-- The export tag contains other, unspecified, tags -->
<export>
<nodelet plugin="${prefix}/plugins/tag_detector_plugin.xml" />
<nodelet plugin="${prefix}/plugins/zed_plugin.xml" />
<nodelet plugin="${prefix}/plugins/can.xml" />
<nodelet plugin="${prefix}/plugins/simulator.xml" />
<nodelet plugin="${prefix}/plugins/tag_detector_plugin.xml"/>
<nodelet plugin="${prefix}/plugins/zed_plugin.xml"/>
<nodelet plugin="${prefix}/plugins/can.xml"/>
<nodelet plugin="${prefix}/plugins/simulator.xml"/>
<nodelet plugin="${prefix}/plugins/object_detector_plugin.xml"/>
</export>
</package>
</package>
6 changes: 6 additions & 0 deletions plugins/object_detector_plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<library path="lib/libobject_detector_nodelet">
<class name="mrover/ObjectDetectorNodelet"
type="mrover::ObjectDetectorNodelet"
base_class_type="nodelet::Nodelet">
</class>
</library>
65 changes: 65 additions & 0 deletions src/perception/image_capture/image_capturepy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env python3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this script for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That script is used for taking pictures through the zed. Could probably be removed from this commit because it has certain things specific to my machine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just remove your personal file path and move it to the scripts folder

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theres also an import from pynput.keyboard import Key, Controller that I think is a package specific to my machine. Its necessary to kill the thread, and I'm not sure how you feel about leaving that in here.


from pynput import keyboard

import rospkg

import os

# python linear algebra library
import numpy as np

# library for interacting with ROS and TF tree
import rospy

import cv2

import datetime


# ROS message types we need to use
from sensor_msgs.msg import Image


def on_press(key):
if key == keyboard.Key.enter:
msg = rospy.wait_for_message("/camera/left/image", Image, timeout=5)
data = np.empty(msg.height * msg.width * 4, dtype=np.uint8)
for x in range(msg.height * msg.width * 4):
data[x] = msg.data[x]

image = np.reshape(data, [msg.height, msg.width, 4])
unique_id = "{date:%Y-%m-%d_%H:%M:%S}".format(date=datetime.datetime.now())
rospack = rospkg.RosPack()
pkgPath = rospack.get_path("mrover")
imagePath = pkgPath + f"/data/Images"
if not os.path.exists(imagePath):
os.mkdir(imagePath)

print(cv2.imwrite(imagePath + f"image_{unique_id}.jpg", image))


def on_release(key):
while False:
continue


class image_capturepy:
def __init__(self):
while False:
continue


def main():
# initialize the node
rospy.init_node("image_capturepy")

listener = keyboard.Listener(on_press=on_press, on_release=on_release)
listener.start()

# let the callback functions run asynchronously in the background
rospy.spin()


if __name__ == "__main__":
main()
Loading