Skip to content

Commit 0a3809b

Browse files
author
ipa-fmw
committed
fetch and carry on cob3-3
1 parent 1a74b8f commit 0a3809b

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

cob_bringup/ros/launch/cob3-3.launch

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<include file="$(find cob_hokuyo)/ros/launch/hokuyo.launch" />
2222

2323
<!-- upper robot -->
24-
<!--include file="$(find cob_lbr)/launch/lbr.launch" /-->
24+
<include file="$(find cob_lbr)/launch/lbr.launch" />
2525
<include file="$(find cob_tray)/ros/launch/tray.launch" />
2626
<include file="$(find cob_torso)/ros/launch/torso.launch" />
2727
<include file="$(find cob_sdh)/ros/launch/sdh.launch" />
@@ -31,11 +31,12 @@
3131
<!-- start additional packages -->
3232
<include file="$(find cob_joint_state_aggregator)/ros/launch/joint_state_aggregator.launch" />
3333
<include file="$(find cob_teleop)/ros/launch/teleop.launch" />
34+
<include file="$(find cob_sound)/ros/launch/sound.launch" />
3435

35-
36+
<!--
3637
<group>
3738
<machine name="pc2" address="cob3-3-pc2" default="true"/>
38-
<!--include file="$(find cob_camera_sensors)/ros/launch/all_cameras.launch" /-->
39+
<include file="$(find cob_camera_sensors)/ros/launch/all_cameras.launch" />
3940
</group>
40-
41+
-->
4142
</launch>

cob_generic_states/src/generic_states.py

+12-14
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ def execute(self, userdata):
112112
# initialize components #
113113
#########################
114114

115-
#handle_head = sss.init("head")
116-
#if handle_head.get_error_code() != 0:
117-
# return 'failed'
115+
handle_head = sss.init("head")
116+
if handle_head.get_error_code() != 0:
117+
return 'failed'
118118

119119
handle_torso = sss.init("torso")
120120
if handle_torso.get_error_code() != 0:
@@ -140,9 +140,9 @@ def execute(self, userdata):
140140
# recover components #
141141
######################
142142

143-
#handle_head = sss.recover("head")
144-
#if handle_head.get_error_code() != 0:
145-
# return 'failed'
143+
handle_head = sss.recover("head")
144+
if handle_head.get_error_code() != 0:
145+
return 'failed'
146146

147147
handle_torso = sss.recover("torso")
148148
if handle_torso.get_error_code() != 0:
@@ -152,7 +152,7 @@ def execute(self, userdata):
152152
if handle_tray.get_error_code() != 0:
153153
return 'failed'
154154

155-
#handle_arm = sss.recover("arm")
155+
handle_arm = sss.recover("arm")
156156
#if handle_arm.get_error_code() != 0:
157157
# return 'failed'
158158

@@ -209,9 +209,10 @@ def execute(self, userdata):
209209

210210
#------------------------------------------------------------------------------------------#
211211

212+
# This state moves the robot to the given pose.
212213
class approach_pose(smach.State):
213214

214-
def __init__(self, pose = ""):
215+
def __init__(self, pose = "", mode = "omni", move_second = "False"):
215216

216217
smach.State.__init__(
217218
self,
@@ -220,8 +221,8 @@ def __init__(self, pose = ""):
220221
output_keys=['pose', 'message'])
221222

222223
self.pose = pose
223-
224-
# This state moves the robot to the given pose.
224+
self.mode = mode
225+
self.move_second = move_second
225226

226227
def execute(self, userdata):
227228

@@ -244,7 +245,7 @@ def execute(self, userdata):
244245

245246
# try reaching pose
246247
handle_base = sss.move("base", pose, False)
247-
move_second = False
248+
move_second = self.move_second
248249

249250
timeout = 0
250251
while True:
@@ -253,9 +254,6 @@ def execute(self, userdata):
253254
handle_base = sss.move("base", pose, False)
254255
move_second = True
255256
elif (handle_base.get_state() == 3) and (move_second):
256-
userdata.message = []
257-
userdata.message.append(3)
258-
userdata.message.append("Pose was succesfully reached")
259257
return 'succeeded'
260258

261259
# check if service is available

cob_script_server/src/simple_script_server.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ def move_traj(self,component_name,parameter_name,blocking):
493493
rospy.logdebug("%s action server ready",action_server_name)
494494

495495
# set operation mode to position
496-
self.set_operation_mode(component_name,"position")
496+
if not component_name == "arm":
497+
self.set_operation_mode(component_name,"position")
497498

498499
# sending goal
499500
client_goal = JointTrajectoryGoal()

0 commit comments

Comments
 (0)