-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
3,782 additions
and
3,782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
|
||
# gitignore template for Jupyter Notebooks | ||
# website: http://jupyter.org/ | ||
|
||
.ipynb_checkpoints | ||
*/.ipynb_checkpoints/* | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# Remove previous ipynb_checkpoints | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
|
||
# gitignore template for Jupyter Notebooks | ||
# website: http://jupyter.org/ | ||
|
||
.ipynb_checkpoints | ||
*/.ipynb_checkpoints/* | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# Remove previous ipynb_checkpoints | ||
# git rm -r .ipynb_checkpoints/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# runway-light-inspection | ||
## Mobile robot for automated visual inspection of the approach lighting system at Aarhus Airport (AAR). | ||
https://www.ilocator.com/proposal//cover.php?ProposalID=6ymasXDnLmC3NSEPzF7ANSlGMOQGCzl4Lx3Svz0prog&debug=yes | ||
|
||
### Running the camera | ||
``` | ||
roslaunch ueye mono.launch | ||
``` | ||
``` | ||
roslaunch ueye stereo.launch | ||
``` | ||
|
||
 | ||
|
||
 | ||
 | ||
# runway-light-inspection | ||
## Mobile robot for automated visual inspection of the approach lighting system at Aarhus Airport (AAR). | ||
https://www.ilocator.com/proposal//cover.php?ProposalID=6ymasXDnLmC3NSEPzF7ANSlGMOQGCzl4Lx3Svz0prog&debug=yes | ||
|
||
### Running the camera | ||
``` | ||
roslaunch ueye mono.launch | ||
``` | ||
``` | ||
roslaunch ueye stereo.launch | ||
``` | ||
|
||
 | ||
|
||
 | ||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
catkin_install_python(PROGRAMS scripts/light_detector_node.py | ||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
catkin_install_python(PROGRAMS scripts/light_detector_node.py | ||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,80 @@ | ||
#!/usr/bin/env python | ||
# license removed for brevity | ||
import rospy | ||
|
||
import cv2 | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
from sklearn.cluster import DBSCAN | ||
|
||
###Gaussian blut on image | ||
##blur = cv2.blur(img,(8,8)) | ||
## | ||
## | ||
#### hsv filter | ||
##hsv = cv2.cvtColor(blur, cv2.COLOR_BGR2HSV) | ||
##lights = cv2.inRange(hsv, (15,0,200), (180,255,255)) | ||
## | ||
## | ||
#### Cluster light hypothesis by using DBSCAN | ||
##light_pixels = np.array(list(indices[:])).T | ||
##db = DBSCAN(eps=5, min_samples=40).fit(light_pixels) | ||
## | ||
##core_samples_mask = np.zeros_like(db.labels_, dtype=bool) | ||
##core_samples_mask[db.core_sample_indices_] = True | ||
##labels = db.labels_ | ||
## | ||
### Number of clusters in labels, ignoring noise if present. | ||
##n_clusters_ = len(set(labels)) - (1 if -1 in labels else 0) | ||
##n_noise_ = list(labels).count(-1) | ||
## | ||
##print('Estimated number of clusters: %d' % n_clusters_) | ||
##print('Estimated number of noise points: %d' % n_noise_) | ||
## | ||
###plt.figure(figsize=(20,4)) | ||
###data = np.array(list(indices)) | ||
###xs = np.array(list(indices[1])) | ||
###ys = np.array(list(indices[0])) | ||
###plt.scatter(xs, ys, c=labels, cmap='jet') | ||
### | ||
###ax=plt.gca() # get the axis | ||
###ax.set_ylim(ax.get_ylim()[::-1]) # invert the axis | ||
###ax.xaxis.tick_top() # and move the X-Axis | ||
### | ||
###plt.show() | ||
## | ||
## | ||
#### Calculate single location per cluster buttom middle of each cluster as homography input | ||
##light_locations = np.zeros([0, 2]) | ||
## | ||
##for cluster_id in range(np.max(labels)+1): | ||
## light_locations = np.vstack((light_locations, np.array([np.mean(xs[labels == [cluster_id]]), np.max(ys[labels == [cluster_id]])]))) | ||
## | ||
###plt.figure(figsize=(20,4)) | ||
###plt.plot(light_locations[:,0], light_locations[:,1], 'rd') | ||
### | ||
###ax=plt.gca() # get the axis | ||
###ax.set_ylim(ax.get_ylim()[::-1]) # invert the axis | ||
###ax.xaxis.tick_top() # and move the X-Axis | ||
### | ||
###plt.show() | ||
## | ||
##np.set_printoptions(threshold=100) | ||
##print(light_locations) | ||
|
||
|
||
def talker(): | ||
pub = rospy.Publisher('chatter', String, queue_size=10) | ||
rospy.init_node('talker', anonymous=True) | ||
rate = rospy.Rate(10) # 10hz | ||
while not rospy.is_shutdown(): | ||
hello_str = "hello world %s" % rospy.get_time() | ||
rospy.loginfo(hello_str) | ||
pub.publish(hello_str) | ||
rate.sleep() | ||
|
||
if __name__ == '__main__': | ||
try: | ||
talker() | ||
except rospy.ROSInterruptException: | ||
#!/usr/bin/env python | ||
# license removed for brevity | ||
import rospy | ||
|
||
import cv2 | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
from sklearn.cluster import DBSCAN | ||
|
||
###Gaussian blut on image | ||
##blur = cv2.blur(img,(8,8)) | ||
## | ||
## | ||
#### hsv filter | ||
##hsv = cv2.cvtColor(blur, cv2.COLOR_BGR2HSV) | ||
##lights = cv2.inRange(hsv, (15,0,200), (180,255,255)) | ||
## | ||
## | ||
#### Cluster light hypothesis by using DBSCAN | ||
##light_pixels = np.array(list(indices[:])).T | ||
##db = DBSCAN(eps=5, min_samples=40).fit(light_pixels) | ||
## | ||
##core_samples_mask = np.zeros_like(db.labels_, dtype=bool) | ||
##core_samples_mask[db.core_sample_indices_] = True | ||
##labels = db.labels_ | ||
## | ||
### Number of clusters in labels, ignoring noise if present. | ||
##n_clusters_ = len(set(labels)) - (1 if -1 in labels else 0) | ||
##n_noise_ = list(labels).count(-1) | ||
## | ||
##print('Estimated number of clusters: %d' % n_clusters_) | ||
##print('Estimated number of noise points: %d' % n_noise_) | ||
## | ||
###plt.figure(figsize=(20,4)) | ||
###data = np.array(list(indices)) | ||
###xs = np.array(list(indices[1])) | ||
###ys = np.array(list(indices[0])) | ||
###plt.scatter(xs, ys, c=labels, cmap='jet') | ||
### | ||
###ax=plt.gca() # get the axis | ||
###ax.set_ylim(ax.get_ylim()[::-1]) # invert the axis | ||
###ax.xaxis.tick_top() # and move the X-Axis | ||
### | ||
###plt.show() | ||
## | ||
## | ||
#### Calculate single location per cluster buttom middle of each cluster as homography input | ||
##light_locations = np.zeros([0, 2]) | ||
## | ||
##for cluster_id in range(np.max(labels)+1): | ||
## light_locations = np.vstack((light_locations, np.array([np.mean(xs[labels == [cluster_id]]), np.max(ys[labels == [cluster_id]])]))) | ||
## | ||
###plt.figure(figsize=(20,4)) | ||
###plt.plot(light_locations[:,0], light_locations[:,1], 'rd') | ||
### | ||
###ax=plt.gca() # get the axis | ||
###ax.set_ylim(ax.get_ylim()[::-1]) # invert the axis | ||
###ax.xaxis.tick_top() # and move the X-Axis | ||
### | ||
###plt.show() | ||
## | ||
##np.set_printoptions(threshold=100) | ||
##print(light_locations) | ||
|
||
|
||
def talker(): | ||
pub = rospy.Publisher('chatter', String, queue_size=10) | ||
rospy.init_node('talker', anonymous=True) | ||
rate = rospy.Rate(10) # 10hz | ||
while not rospy.is_shutdown(): | ||
hello_str = "hello world %s" % rospy.get_time() | ||
rospy.loginfo(hello_str) | ||
pub.publish(hello_str) | ||
rate.sleep() | ||
|
||
if __name__ == '__main__': | ||
try: | ||
talker() | ||
except rospy.ROSInterruptException: | ||
pass |
Oops, something went wrong.