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

[hokuyo_estimation] Estimation of tree position and diameter from 2D lidar scan #616

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7b9b95a
[hokuyo_estimation][build] init commit and evaluate by building code
HarukiKozukapenguin Apr 29, 2024
9f8dd65
[hokuyo_estimation] add odom subscriber
HarukiKozukapenguin Apr 30, 2024
d205d7b
[hokuyo_estimation] add robot_ns in lanch file
HarukiKozukapenguin Apr 30, 2024
12dc417
[hokuyo_estimation] rename odom to match to jsk_aerial_robot
HarukiKozukapenguin Apr 30, 2024
1683278
[hokuyo_estimation] delete prev_vote calculation
HarukiKozukapenguin Apr 30, 2024
77f6d71
[WIP][hokuyo_estimation][build ok] add filter system
HarukiKozukapenguin May 2, 2024
d69280f
[hokuyo_estimation] change include path from jsk_uav_forest_perceptio…
HarukiKozukapenguin May 4, 2024
1c0f43a
[WIP][hokuyo_estimation][launch OK] add filter package to inclde filt…
HarukiKozukapenguin May 4, 2024
9dcb827
[hokuyo_estimation] rename subscribing laser topic name of tree_track…
HarukiKozukapenguin May 4, 2024
8e9aea0
[hokuyo_estimation] add change config file to notice in different obs…
HarukiKozukapenguin May 7, 2024
f45ad0c
[hokuyo_estimation] show rviz data
HarukiKozukapenguin May 20, 2024
b189eff
[hokuyo_estimation] show result of the tree
HarukiKozukapenguin May 20, 2024
13c0327
[hokuyo_estimation] add odom data
HarukiKozukapenguin May 20, 2024
2323214
[hokuyo_estimation] show odom and tree data
HarukiKozukapenguin May 20, 2024
57c5056
[hokuyo_estimation] fix position of rviz
HarukiKozukapenguin May 20, 2024
30560ee
[hokuyo_estimation] change to easy to watch lider output
HarukiKozukapenguin May 22, 2024
fbe2e65
[hokuyo_estimation][LaserShadowFilter][gain tuning] percept close obs…
HarukiKozukapenguin May 23, 2024
dc9d177
[hokuyo_estimation][from rosbag data] change LaserShadowFilter param …
HarukiKozukapenguin May 23, 2024
ca9c893
[hokuyo_estimation] make visualize launch file to check estimation in…
HarukiKozukapenguin May 23, 2024
0f947b1
[hokuyo_estimation] bringup hokuyo_estimation from bringup.launch in …
HarukiKozukapenguin May 23, 2024
6a8ce37
[hokuyo_estimation] comment out ROS_INFO for this is already debugged
HarukiKozukapenguin May 24, 2024
5f64d2a
[hokuyo_estimation][debug] able to scan in hokuyo_sensor
HarukiKozukapenguin Jun 4, 2024
fe76e17
[hokuyo_estimation] show tree_info easily for real experiment
HarukiKozukapenguin Jun 8, 2024
bb59ee2
[hokuyo_estimation] add laser_filters and filters in components
HarukiKozukapenguin Jun 8, 2024
6fb91b9
[hokuyo_estimation] not overwritten CMAKE_CXX_FLAGS
HarukiKozukapenguin Jun 8, 2024
eb55ed5
[hokuyo_estimation] add CATKIN_DEPENDS from github action
HarukiKozukapenguin Jun 8, 2024
77e552d
[hokuyo_estimation] install plugin file in CmakeLists
HarukiKozukapenguin Jun 8, 2024
128eb40
[hokuyo_estimation] delete tree_tracking in LIBRARIES variable for th…
HarukiKozukapenguin Jun 8, 2024
269841d
[hokuyo_estimation] rename package name from hokuyo_estimation to tre…
HarukiKozukapenguin Jun 8, 2024
aceeba8
[hokuyo_estimation] rename tree_tracking include dir
HarukiKozukapenguin Jun 8, 2024
58f186b
[tree_tracking] not change CMAKE_CXX_FLAGS but add compile option by …
HarukiKozukapenguin Jun 8, 2024
35e55a7
[tree_tracking] add tree_tracking_node to targets
HarukiKozukapenguin Jun 8, 2024
9e7b6a9
[tree_tracking] add rviz and urg_node in exec_depend
HarukiKozukapenguin Jun 8, 2024
d3908a1
[tree_tracking] install tree_tracking
HarukiKozukapenguin Jun 8, 2024
defbc37
[tree_estimation] set include variable before catkin_package
HarukiKozukapenguin Jun 10, 2024
aa6755e
[tree_tracking][debug] delete catkin_package
HarukiKozukapenguin Jun 10, 2024
7c2e7fa
[tree_tracking] include LIBRARIES
HarukiKozukapenguin Jun 10, 2024
3be9284
[tree_tracking][debug] add test to inclde_directories
HarukiKozukapenguin Jun 10, 2024
1112858
[tree_tracking][debug] add test to inclde_directories
HarukiKozukapenguin Jun 10, 2024
981e4f1
[tree_tracking] add install directory in install command
HarukiKozukapenguin Jun 10, 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
83 changes: 83 additions & 0 deletions tree_tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
cmake_minimum_required(VERSION 3.0.2)
project(tree_tracking)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
cmake_modules
cv_bridge
dynamic_reconfigure
geometry_msgs
image_geometry
image_transport
nodelet
roscpp
sensor_msgs
std_msgs
tf
laser_filters
filters
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_compile_options(-std=c++11)

find_package(OpenCV REQUIRED)
message(WARNING "OPENCV ${OpenCV_VERSION} FOUND")

catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS roscpp sensor_msgs nodelet tf std_msgs dynamic_reconfigure geometry_msgs
LIBRARIES tree_tracking
)

###########
## Build ##
###########
include_directories(
include
${OpenCV_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)

# catkin_package(
# INCLUDE_DIRS include
# CATKIN_DEPENDS roscpp sensor_msgs nodelet tf std_msgs dynamic_reconfigure geometry_msgs
# # LIBRARIES tree_tracking
# )

add_library(laser_clustering_filter SHARED src/laser_clustering_filter.cpp)
target_link_libraries(laser_clustering_filter ${catkin_LIBRARIES})

add_library(tree_tracking src/tree_tracking.cpp src/tree_database.cpp src/circle_detection.cpp)
target_link_libraries(tree_tracking ${catkin_LIBRARIES})

install(TARGETS tree_tracking
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

add_executable(tree_tracking_node src/tree_tracking_node.cpp)
target_link_libraries (tree_tracking_node ${catkin_LIBRARIES} tree_tracking)

#############
## Install ##
#############
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

install(
TARGETS tree_tracking_node
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(
FILES laser_filters_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
227 changes: 227 additions & 0 deletions tree_tracking/config/rviz_config.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
- /Grid1
- /LaserScan1
- /LaserScan2
- /LaserScan3
- /MarkerArray1
- /Axes1
Splitter Ratio: 0.45338207483291626
Tree Height: 1239
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Name: Time
SyncMode: 0
SyncSource: LaserScan
Preferences:
PromptSaveOnExit: true
Toolbars:
toolButtonStyle: 2
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/LaserScan
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Min Color: 0; 0; 0
Name: LaserScan
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.009999999776482582
Style: Flat Squares
Topic: /multirotor/scan
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/LaserScan
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Min Color: 0; 0; 0
Name: LaserScan
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.009999999776482582
Style: Flat Squares
Topic: /multirotor/shadow_filtered
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/LaserScan
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Min Color: 0; 0; 0
Name: LaserScan
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.009999999776482582
Style: Flat Squares
Topic: /multirotor/scan_clustered
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Class: rviz/MarkerArray
Enabled: true
Marker Topic: /multirotor/visualization_marker
Name: MarkerArray
Namespaces:
tree: true
tree_diameter: true
Queue Size: 100
Value: true
- Alpha: 1
Class: rviz/Axes
Enabled: true
Length: 1
Name: Axes
Radius: 0.10000000149011612
Reference Frame: multirotor/main_body
Show Trail: false
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: world
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Theta std deviation: 0.2617993950843811
Topic: /initialpose
X std deviation: 0.5
Y std deviation: 0.5
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 12.02877140045166
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Field of View: 0.7853981852531433
Focal Point:
X: 1.8418309688568115
Y: 0.056299153715372086
Z: -0.24842405319213867
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 1.14479660987854
Target Frame: <Fixed Frame>
Yaw: 3.213582992553711
Saved: ~
Window Geometry:
Displays:
collapsed: true
Height: 1536
Hide Left Dock: true
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd00000004000000000000021900000562fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073000000003d00000562000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010000000562fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d00000562000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000003f10000003efc0100000002fb0000000800540069006d00650100000000000003f1000003bc00fffffffb0000000800540069006d00650100000000000004500000000000000000000003f10000056200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: true
Width: 1009
X: 1551
Y: 27
10 changes: 10 additions & 0 deletions tree_tracking/include/tree_tracking/circle_detection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef UTIL_CIRCLE_DETECTION_H
#define UTIL_CIRCLE_DETECTION_H

#include <tf/transform_broadcaster.h>
#include <vector>

namespace CircleDetection {
void circleFitting(const std::vector<tf::Vector3>& points, tf::Vector3& tree_center_location, double& tree_radius, double& regulation);
}
#endif
Loading
Loading