Skip to content

Commit

Permalink
Update Continuous calls in Car_linear and Turtlebot domains
Browse files Browse the repository at this point in the history
  • Loading branch information
Maumagnaguagno committed Dec 16, 2023
1 parent e2fb635 commit a7c75a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 34 deletions.
22 changes: 7 additions & 15 deletions examples/car_linear/car_linear.ujshop
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
()
(
(engine_running)
(call process_effect)
(call process increase d displacement ?start ?finish)
(call process increase v moving_custom ?start ?finish)
(call processes (
(increase d displacement ?start ?finish)
(increase v moving_custom ?start ?finish)
))
)
)

Expand All @@ -33,10 +34,7 @@
(call = (call function a ?time) 0)
)
((engine_running))
(
(call event_effect)
(call event assign v 0 ?time)
)
((call event assign v 0 ?time))
)

(:operator (!accelerate ?time)
Expand All @@ -45,10 +43,7 @@
(call < (call function a ?time) (call function max_acceleration))
)
()
(
(call event_effect)
(call event increase a 1 ?time)
)
((call event increase a 1 ?time))
)

(:operator (!decelerate ?time)
Expand All @@ -57,10 +52,7 @@
(call > (call function a ?time) (call function min_acceleration))
)
()
(
(call event_effect)
(call event decrease a 1 ?time)
)
((call event decrease a 1 ?time))
)

(:operator (!!test_destination ?min_destination ?max_destination ?time)
Expand Down
27 changes: 8 additions & 19 deletions examples/turtlebot/turtlebot.ujshop
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,25 @@
(:operator (!increment_velocity_x ?robot ?time)
()
()
(
(call event_effect)
(call event increase (vx ?robot) 1 ?time)
)
((call event increase (vx ?robot) 1 ?time))
)

(:operator (!decrement_velocity_x ?robot ?time)
()
()
(
(call event_effect)
(call event decrease (vx ?robot) 1 ?time)
)
((call event decrease (vx ?robot) 1 ?time))
)

(:operator (!turn_clockwise ?robot ?angle ?time)
()
()
(
(call event_effect)
(call event assign (a ?robot) ?angle ?time)
)
((call event assign (a ?robot) ?angle ?time))
)

(:operator (!turn_counter_clockwise ?robot ?angle ?time)
()
()
(
(call event_effect)
(call event assign (a ?robot) ?angle ?time)
)
((call event assign (a ?robot) ?angle ?time))
)

(:operator (!!set ?robot ?pos)
Expand All @@ -74,9 +62,10 @@
()
()
(
(call process_effect)
(call process increase (x ?robot) displacement_x ?start ?finish)
(call process increase (y ?robot) displacement_y ?start ?finish)
(call processes (
(increase (x ?robot) displacement_x ?start ?finish)
(increase (y ?robot) displacement_y ?start ?finish)
))
)
)

Expand Down

0 comments on commit a7c75a3

Please sign in to comment.