correction in is_real_robot
This commit is contained in:
Родитель
5523661605
Коммит
2f04b35d50
|
@ -18,14 +18,17 @@ BLOCK_COLOR_MAPPINGS = [
|
|||
|
||||
TRAY_COLORS = ["Red", "Green", "Blue"]
|
||||
|
||||
TABLE_HEIGHT=-0.15
|
||||
TABLE_HEIGHT = -0.15
|
||||
|
||||
TRAY_SURFACE_THICKNESS=0.04
|
||||
TRAY_SURFACE_THICKNESS = 0.04
|
||||
|
||||
ARM_TOP_VIEW_Z_OFFSET = 0.05 #meters
|
||||
ARM_TOP_VIEW_Z_OFFSET = 0.05 # meters
|
||||
|
||||
SIMULATE_TRAY_BLOCK_DETECTION = True
|
||||
|
||||
def is_real_robot ():
|
||||
return not rospy.has_param("/use_sim_time") and not rospy.get_param("/use_sim_time")
|
||||
|
||||
def is_real_robot():
|
||||
if rospy.has_param("/use_sim_time"):
|
||||
return not rospy.get_param("/use_sim_time")
|
||||
else:
|
||||
return False
|
||||
|
|
|
@ -7,8 +7,8 @@ from task_planner import TaskPlanner
|
|||
import demo_constants
|
||||
import gazebo_models
|
||||
|
||||
def main():
|
||||
|
||||
def main():
|
||||
rospy.init_node("sorting_demo")
|
||||
rospy.logwarn("Hello world")
|
||||
|
||||
|
@ -26,34 +26,32 @@ def main():
|
|||
|
||||
rospy.logwarn("Hello world")
|
||||
|
||||
|
||||
task_planner.create_go_home_task(check_obstacles=False).result()
|
||||
|
||||
task_facade = task_planner.get_task_facade()
|
||||
|
||||
#task_facade.start()
|
||||
task_facade.start()
|
||||
|
||||
task_facade.run_rest_server()
|
||||
|
||||
#rospy.sleep(15)
|
||||
#task_facade.pick_block_by_color("BLUE")
|
||||
#task_facade.put_block_into_tray("BLUE", "1")
|
||||
# rospy.sleep(15)
|
||||
# task_facade.pick_block_by_color("BLUE")
|
||||
# task_facade.put_block_into_tray("BLUE", "1")
|
||||
|
||||
#task_facade.put_all_contents_on_table()
|
||||
# task_facade.put_all_contents_on_table()
|
||||
|
||||
#task_facade.pause()
|
||||
# task_facade.pause()
|
||||
|
||||
#rospy.sleep(30)
|
||||
#task_facade.resume()
|
||||
# rospy.sleep(30)
|
||||
# task_facade.resume()
|
||||
|
||||
#task_facade.stop("GREEN")
|
||||
# task_facade.stop("GREEN")
|
||||
|
||||
rospy.logwarn("task planner spin")
|
||||
task_planner.spin()
|
||||
|
||||
# ask the robot to greet
|
||||
#task_facade.greet()
|
||||
|
||||
# task_facade.greet()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Загрузка…
Ссылка в новой задаче