Skip to content

Commit

Permalink
LISBON: Before finals commit. All TBMs and FBMs
Browse files Browse the repository at this point in the history
All TBMs and FBMs have been run at least once.
  • Loading branch information
Central Factoy Hub committed Nov 22, 2015
1 parent f0a95c4 commit be227eb
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 56 deletions.
6 changes: 3 additions & 3 deletions rockin/clips/globals.clp
Expand Up @@ -39,9 +39,9 @@
?*FBM1-TIME* = 120 ; per run
?*FBM2-PREPARATION-TIME* = 30
?*FBM2-EXECUTION-TIME* = 210 ; per run
?*FBM3-CALIBRATION-TIME* = 30
?*FBM3-PREPARATION-TIME* = 30
?*FBM3-EXECUTION-TIME* = 60 ; per run
?*FBM3-CALIBRATION-TIME* = 60
?*FBM3-PREPARATION-TIME* = 60
?*FBM3-EXECUTION-TIME* = 120 ; per run

; Benchmark repetitions
?*TBM-COUNT* = 1
Expand Down
2 changes: 2 additions & 0 deletions rockin/clips/net.clp
Expand Up @@ -216,6 +216,7 @@
(if (eq ?pb-event RESET) then
(send [benchmark] switch-scenario)
else
(printout t "RECV TRANSITION EVENT: " ?pb-event crlf)
(bind ?state-machine (send [benchmark] get-state-machine))
(send ?state-machine process-event ?pb-event)
)
Expand Down Expand Up @@ -523,6 +524,7 @@
(bind ?state-post (send ?state-machine get-current-state))

(if (neq ?state-pre ?state-post) then
(printout t "SENDING TO CLIENTS" crlf)
; Forward the feedback to all clients
(do-for-all-facts ((?client network-client)) TRUE
(pb-send ?client:id ?p)
Expand Down
53 changes: 11 additions & 42 deletions rockin/clips/task-benchmarks.clp
Expand Up @@ -40,7 +40,7 @@
(bind ?em-01-01-location (pick-random$ ?shelf-locations))

; The location of EM-01-01 should should not be reused
(delete-member$ ?shelf-locations ?em-01-01-location)
(bind ?shelf-locations (delete-member$ ?shelf-locations ?em-01-01-location))

; Inventory
(slot-insert$ [inventory] items 1
Expand Down Expand Up @@ -68,8 +68,8 @@
; Deliver 2 items of AX-01 to EM-01-01
(make-instance of Order (status OFFERED) (object-id [ax-01]) (container-id [em-01-01]) (quantity-requested 2))

; Deliver container EM-01-01 to location WS-01
(make-instance of Order (status OFFERED) (object-id [em-01-01]) (destination-id [workstation-01]))
; Deliver container EM-01-01 to location WS-03
(make-instance of Order (status OFFERED) (object-id [em-01-01]) (destination-id [workstation-03]))
)
)

Expand Down Expand Up @@ -110,36 +110,14 @@
(states [stopped-state] [running-state] [paused-state] [finished-state])
)


(bind ?shelf-locations (create$ [shelf-01] [shelf-02] [shelf-03] [shelf-04]
[shelf-05] [shelf-06] [shelf-07] [shelf-08] [shelf-09] [shelf-10]
[shelf-11] [shelf-12]))

; Randomize a location for EM-02-01
(bind ?em-02-01-location (pick-random$ ?shelf-locations))

; Inventory
(slot-insert$ [inventory] items 1
;;;;;;;;;;;;;;
; Cover plates
;;;;;;;;;;;;;;

; 5 cover plates with unknown state on conveyor belt CB-01
(make-instance of Item (object-id [ax-15]) (location-id [conveyor_belt-01]) (quantity 1))
(make-instance of Item (object-id [ax-15]) (location-id [conveyor_belt-01]) (quantity 1))
(make-instance of Item (object-id [ax-15]) (location-id [conveyor_belt-01]) (quantity 1))
(make-instance of Item (object-id [ax-15]) (location-id [conveyor_belt-01]) (quantity 1))
(make-instance of Item (object-id [ax-15]) (location-id [conveyor_belt-01]) (quantity 1))

;;;;;;;;;;;;;;;;;;;;;;
; Manipulation objects
;;;;;;;;;;;;;;;;;;;;;;

; File-card box EM-02-01 at random location
(make-instance of Item (object-id [em-02-01]) (location-id ?em-02-01-location) (quantity 1))

; File-card box EM-02-01 on robot
;(make-instance of Item (object-id [em-02-01]) (location-id [robot]) (quantity 1))
; File-card box EM-02-01 at WS-01
(make-instance of Item (object-id [em-02-01]) (location-id [workstation-01]) (quantity 1))

; Common shelf container ER-02-01 in location CB-01
(make-instance of Item (object-id [er-02-01]) (location-id [conveyor_belt-01]) (quantity 1))
Expand All @@ -148,20 +126,11 @@

; Orders
(slot-insert$ [order-info] orders 1
; Deliver file-card box EM-02-01 to workstation WS-05
(make-instance of Order (status OFFERED) (object-id [em-02-01]) (destination-id [workstation-05]))

; Deliver 5 machined cover plates AX-07 into file-card box EM-02-01
(make-instance of Order (status OFFERED) (object-id [ax-07]) (container-id [em-02-01]) (quantity-requested 1))
(make-instance of Order (status OFFERED) (object-id [ax-07]) (container-id [em-02-01]) (quantity-requested 1))
(make-instance of Order (status OFFERED) (object-id [ax-07]) (container-id [em-02-01]) (quantity-requested 1))
; Deliver 2 machined cover plates AX-07 into file-card box EM-02-01
(make-instance of Order (status OFFERED) (object-id [ax-07]) (container-id [em-02-01]) (quantity-requested 1))
(make-instance of Order (status OFFERED) (object-id [ax-07]) (container-id [em-02-01]) (quantity-requested 1))

; Deliver 5 unusable cover plates AX-08 into common shelf container ER-02-01
(make-instance of Order (status OFFERED) (object-id [ax-08]) (container-id [er-02-01]) (quantity-requested 1))
(make-instance of Order (status OFFERED) (object-id [ax-08]) (container-id [er-02-01]) (quantity-requested 1))
(make-instance of Order (status OFFERED) (object-id [ax-08]) (container-id [er-02-01]) (quantity-requested 1))
; Deliver 2 unusable cover plates AX-08 into common shelf container ER-02-01
(make-instance of Order (status OFFERED) (object-id [ax-08]) (container-id [er-02-01]) (quantity-requested 1))
(make-instance of Order (status OFFERED) (object-id [ax-08]) (container-id [er-02-01]) (quantity-requested 1))
)
Expand Down Expand Up @@ -213,7 +182,7 @@
(bind ?er-02-01-location (pick-random$ ?shelf-locations))

; The location of the assembly aid tray should should not be reused
(delete-member$ ?shelf-locations ?er-02-01-location)
(bind ?shelf-locations (delete-member$ ?shelf-locations ?er-02-01-location))

; Inventory
(slot-insert$ [inventory] items 1
Expand Down Expand Up @@ -241,7 +210,7 @@
(make-instance of Item (object-id [ax-04]) (location-id (pick-random$ ?shelf-locations)) (quantity 1))

; 1 distance tube AX-05 at random location
(make-instance of Item (object-id [ax-08]) (location-id (pick-random$ ?shelf-locations)) (quantity 1))
(make-instance of Item (object-id [ax-05]) (location-id (pick-random$ ?shelf-locations)) (quantity 1))

; 1 motor with gear box AX-09 at random location
(make-instance of Item (object-id [ax-09]) (location-id (pick-random$ ?shelf-locations)) (quantity 1))
Expand All @@ -250,8 +219,8 @@

; Orders
(slot-insert$ [order-info] orders 1
; Deliver foam container ER-02-01 to workstation WS-03
(make-instance of Order (status OFFERED) (object-id [er-02-01]) (destination-id [workstation-03]))
; Deliver foam container ER-02-01 to workstation WS-06
(make-instance of Order (status OFFERED) (object-id [er-02-01]) (destination-id [workstation-06]))

; Deliver 1 bearing box AX-01 into foam container ER-02-01
(make-instance of Order (status OFFERED) (object-id [ax-01]) (container-id [er-02-01]) (quantity-requested 1))
Expand Down
8 changes: 5 additions & 3 deletions rockin/plugins/drilling_machine/drilling_machine_thread.cpp
Expand Up @@ -158,10 +158,12 @@ void DrillingMachineThread::moveDrill(DrillingMachineCommand::Command drill_comm
fawkes::MutexLocker lock(clips_mutex);
// prevent sending to many messages to the device
time_diff = boost::posix_time::microsec_clock::local_time() - last_sent_command_timestamp_;
if (time_diff.total_milliseconds() < 200)
if (time_diff.total_milliseconds() < 1000)
return;



if(last_status_msg_.state() == DrillingMachineStatus::MOVING_UP || last_status_msg_.state() == DrillingMachineStatus::MOVING_DOWN)
return;

command_msg.set_command(drill_command);

zmq::message_t *query = NULL;
Expand Down
22 changes: 14 additions & 8 deletions rockin/tools/rockin-fake-robot.cpp
Expand Up @@ -242,26 +242,29 @@ handle_timer(const boost::system::error_code& error)


// Request a camera image
/*
CameraCommand cam_cmd;
peer_team_->send(cam_cmd);

*/

// Send benchnmark feedback
BenchmarkFeedback bf;
bf.mutable_object_pose()->mutable_position()->set_x(0.0);
bf.mutable_object_pose()->mutable_position()->set_y(0.0);
bf.mutable_object_pose()->mutable_position()->set_z(0.0);
bf.mutable_object_pose()->mutable_orientation()->set_w(0.0);
bf.mutable_object_pose()->mutable_orientation()->set_x(1.0);
bf.mutable_object_pose()->mutable_orientation()->set_w(1.0);
bf.mutable_object_pose()->mutable_orientation()->set_x(0.0);
bf.mutable_object_pose()->mutable_orientation()->set_y(0.0);
bf.mutable_object_pose()->mutable_orientation()->set_z(0.0);
/*
bf.mutable_end_effector_pose()->mutable_position()->set_x(0.0);
bf.mutable_end_effector_pose()->mutable_position()->set_y(0.0);
bf.mutable_end_effector_pose()->mutable_position()->set_z(0.0);
bf.mutable_end_effector_pose()->mutable_orientation()->set_w(0.0);
bf.mutable_end_effector_pose()->mutable_orientation()->set_x(1.0);
bf.mutable_end_effector_pose()->mutable_orientation()->set_w(1.0);
bf.mutable_end_effector_pose()->mutable_orientation()->set_x(0.0);
bf.mutable_end_effector_pose()->mutable_orientation()->set_y(0.0);
bf.mutable_end_effector_pose()->mutable_orientation()->set_z(0.0);
*/
bf.set_object_instance_name("AX-01");
bf.set_object_class_name("aluminium");
bf.set_grasp_notification(true);
Expand All @@ -270,13 +273,15 @@ handle_timer(const boost::system::error_code& error)


// Command the conveyor belt
/*
TriggeredConveyorBeltCommand cb_cmd;
cb_cmd.set_command(ConveyorBeltRunMode::START);
cb_cmd.set_next_cycle(conveyor_belt_cycle_ + 1);
peer_public_->send(cb_cmd);

*/

// Send robot status report
/**
RobotStatusReport report;
RobotStatus *status;
status = report.add_status();
Expand All @@ -288,7 +293,7 @@ handle_timer(const boost::system::error_code& error)
status->set_functionality("NavigationPlanner");
status->set_meta_data("Planning a path for the base");
peer_public_->send(report);

*/

// Send if the robot is logging offline benchmarking data
LoggingStatus logging;
Expand All @@ -297,10 +302,11 @@ handle_timer(const boost::system::error_code& error)


// Accept an order
/*
OrderAcceptance acceptance;
acceptance.add_id(1);
peer_team_->send(acceptance);

*/

timer_->expires_at(timer_->expires_at()
+ boost::posix_time::milliseconds(2000));
Expand Down

0 comments on commit be227eb

Please sign in to comment.