-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #889 from tue-robotics/rwc2019_robot_skills
Rwc2019 robot skills
- Loading branch information
Showing
27 changed files
with
668 additions
and
195 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env python | ||
|
||
import rospy | ||
from robot_skills.force_sensor import ForceSensor | ||
|
||
rospy.init_node('test_force_sensor_edge_up', anonymous=True) | ||
rospy.sleep(1.0) # In simulation time is not yet available ... | ||
ForceSensor('/hero/wrist_wrench/raw').wait_for_edge_up() | ||
rospy.loginfo("Edge up detected") |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env python | ||
from ed_sensor_integration.srv import RayTrace | ||
from geometry_msgs.msg import PoseStamped | ||
from robot_skills import perception | ||
import rospy | ||
from std_msgs.msg import Header | ||
from tf import TransformListener | ||
|
||
rospy.init_node('ray_trace_example') | ||
|
||
p = perception.Perception("hero", None, None, camera_base_ns="hero/head_rgbd_sensor") | ||
|
||
srv_proxy = rospy.ServiceProxy("/hero/ed/ray_trace", RayTrace) | ||
|
||
tf_listener = TransformListener() | ||
|
||
while not rospy.is_shutdown(): | ||
rgb, depth, depth_info = p.get_rgb_depth_caminfo() | ||
if rgb: | ||
persons = p.detect_person_3d(*p.get_rgb_depth_caminfo()) | ||
for person in persons: | ||
if "is_pointing" in person.tags: | ||
try: | ||
map_pose = tf_listener.transformPose("map", PoseStamped( | ||
header=Header( | ||
frame_id="head_rgbd_sensor_rgb_optical_frame", | ||
stamp=rospy.Time.now() - rospy.Duration.from_sec(0.5) | ||
), | ||
pose=person.pointing_pose | ||
)) | ||
srv_proxy(raytrace_pose=map_pose) | ||
|
||
except Exception as e: | ||
rospy.logerr("Could not get ray trace from closest person: {}".format(e)) |
9 changes: 9 additions & 0 deletions
9
robot_skills/hardware_tests/test_move_down_until_force_sensor_edge_up.py
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env python | ||
import rospy | ||
from robot_skills.util.robot_constructor import robot_constructor | ||
|
||
rospy.init_node('test_mode_down_until_force_sensor_edge_up', anonymous=True) | ||
robot = robot_constructor("hero") | ||
arm = robot.get_arm() | ||
|
||
arm.move_down_until_force_sensor_edge_up() |
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
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
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
Oops, something went wrong.