Skip to content

Commit

Permalink
Merge branch 'perception-indigo-fixes' into 'indigo'
Browse files Browse the repository at this point in the history
Perception indigo fixes

* removed c++11 compilation. This was causing tabletop_cloud_accumulator and clusterer to crash on launch. Probably caused because PCL wasn't complied with c++11 [github issue](PointCloudLibrary/pcl#619)
* removed unused code (plane extraction, polyclipping)
* fixed warnings about specifying queue_size in publishers
* use cPickle instead of joblib to pickle the svm classifier. So there's no need to install an old version of sklearn/joblib

There is a problem with the ProjectInliers nodelet that still needs to be looked into (#19). Otherwise, the perception pipeline is compiling, launching and running ok under indigo.

See merge request !170
  • Loading branch information
Frederik Hegger committed Mar 16, 2016
2 parents 5adf929 + fc56e3c commit 0e91617
Show file tree
Hide file tree
Showing 69 changed files with 370 additions and 1,351 deletions.
3 changes: 3 additions & 0 deletions mcr_object_detection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(mcr_object_detection)

find_package(catkin REQUIRED
COMPONENTS
roslint
mcr_scene_segmentation
)

Expand All @@ -18,6 +19,8 @@ catkin_package(
tf
)

roslint_python()

### TESTS
if(CATKIN_ENABLE_TESTING)
find_package(roslaunch REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions mcr_object_detection/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<run_depend>tf</run_depend>

<build_depend>mcr_scene_segmentation</build_depend>
<build_depend>roslint</build_depend>

<test_depend>roslaunch</test_depend>

Expand Down
4 changes: 2 additions & 2 deletions mcr_object_detection/ros/scripts/object_detector
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ if __name__ == '__main__':
else:
event_out_pub.publish("e_failed")

object_list_pub = rospy.Publisher('~object_list', ObjectList)
object_list_pub = rospy.Publisher('~object_list', ObjectList, queue_size=1)
event_in_sub = rospy.Subscriber('~event_in', std_msgs.msg.String, event_in_cb)
event_out_pub = rospy.Publisher('~event_out', std_msgs.msg.String)
event_out_pub = rospy.Publisher('~event_out', std_msgs.msg.String, queue_size=1)
rospy.loginfo('Started [detect_objects] node.')
rospy.spin()
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env python

PACKAGE = 'mcr_object_detection'

import roslib
roslib.load_manifest(PACKAGE)
import rospy

from smach import cb_interface, State
Expand Down
27 changes: 13 additions & 14 deletions mcr_object_detection/ros/src/mcr_object_detection/topic_states.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
#!/usr/bin/env python

PACKAGE = 'mcr_object_detection'

import roslib
roslib.load_manifest(PACKAGE)

import rospy

import smach
import std_msgs.msg
import mcr_perception_msgs.msg


class FindWorkspace(smach.State):
def __init__(self):
smach.State.__init__(self,
output_keys=['polygon'],
outcomes=['succeeded', 'aborted'])
output_keys=['polygon'],
outcomes=['succeeded', 'aborted'])
self.event_pub = rospy.Publisher('/mcr_perception/workspace_finder/event_in', std_msgs.msg.String, queue_size=1)
self.event_sub = rospy.Subscriber('/mcr_perception/workspace_finder/event_out', std_msgs.msg.String, self.e_callback)
self.polygon_sub = rospy.Subscriber('/mcr_perception/workspace_finder/polygon', mcr_perception_msgs.msg.PlanarPolygon, self.poly_callback)
self.event_sub = rospy.Subscriber('/mcr_perception/workspace_finder/event_out',
std_msgs.msg.String, self.e_callback)
self.polygon_sub = rospy.Subscriber('/mcr_perception/workspace_finder/polygon',
mcr_perception_msgs.msg.PlanarPolygon, self.poly_callback)

def e_callback(self, event):
self.polygon_event = event.data

def poly_callback(self, data):
self.polygon = data

def execute(self, userdata):
self.polygon_event = ""
self.polygon = None

self.event_pub.publish("e_trigger")

timeout = rospy.Duration.from_sec(10.0) # wait max of 10.0 seconds
timeout = rospy.Duration.from_sec(10.0) # wait max of 10.0 seconds
start_time = rospy.Time.now()

while (True):
if self.polygon_event == "e_done" and self.polygon is not None:
userdata.polygon = self.polygon
Expand All @@ -48,17 +47,17 @@ def execute(self, userdata):
return 'aborted'

rospy.sleep(0.01)

return 'succeeded'


class PointCloudSubscription(smach.State):
def __init__(self, subscribe=False, cloud_topic=None):
smach.State.__init__(self,
outcomes=['done'])
outcomes=['done'])
self.subscribe = subscribe
self.cloud_topic = cloud_topic
self.mux_topic_pub = rospy.Publisher('/mcr_perception/mux_pointcloud/select', std_msgs.msg.String)
self.mux_topic_pub = rospy.Publisher('/mcr_perception/mux_pointcloud/select', std_msgs.msg.String, queue_size=1)

def execute(self, ud):
if self.subscribe:
Expand Down
6 changes: 5 additions & 1 deletion mcr_object_recognition_mean_circle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ find_package(catkin REQUIRED
COMPONENTS
mcr_scene_segmentation
mcr_perception_msgs
roscpp
pcl_ros
roscpp
roslint
)

catkin_python_setup()
Expand Down Expand Up @@ -41,6 +42,9 @@ include_directories(
)


roslint_python()
roslint_cpp()

### TESTS
if(CATKIN_ENABLE_TESTING)
find_package(roslaunch REQUIRED)
Expand Down
6 changes: 1 addition & 5 deletions mcr_object_recognition_mean_circle/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
The current model is trained with sklearn version 0.15.2. The trained model is NOT compatible with higher versions.

You can install version 0.15.2 with the following command:

sudo pip install scikit-learn==0.15.2
The current model is trained with sklearn version 0.14.1.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 0e91617

Please sign in to comment.