Expected program sequence




Expected program sequence

Postby AM-Robotics » Thu 23. Oct 2014, 07:50

Hi,
I have a question concerning the expected program sequence.
Do we get a list of 6 scene files in the final evaluation and solve each of the task in one sequence? Or do you start our program for each task?
Concerning this we have some problems with the reset of the ros time variable (which resets to 0).

What happens exactly with our score when the simulator runs longer than the time limit or the simulator gets red? Do we receive 0 points?

Thanks!
AM-Robotics
 
Posts: 14
Joined: Mon 21. Jul 2014, 15:43

by Advertising » Thu 23. Oct 2014, 07:50

Advertising
 

Re: Expected program sequence

Postby Peter Lehner » Thu 23. Oct 2014, 09:34

AM-Robotics wrote:Do we get a list of 6 scene files in the final evaluation and solve each of the task in one sequence? Or do you start our program for each task?

In the final evaluation you can query the list of scene tasks just as now with the list_scenes service. You can then identify the task number from the 'name' field of the task description. You are expected to automatically start and solve each task by calling your solution application in /opt/euroc_c2s1/startup as specified in the technical annex, Section 4.2.

AM-Robotics wrote:Concerning this we have some problems with the reset of the ros time variable (which resets to 0).

The ros time variable is reset to enable ros simulation time. What is your problem?

AM-Robotics wrote:What happens exactly with our score when the simulator runs longer than the time limit or the simulator gets red? Do we receive 0 points?

If you run out of time the log file automatically closes. You will receive the points you have scored already by for example picking up or placing objects in the time limit. The same accounts for when the simulator goes into e-stop (red lights) if you call save_log after the e-stop or wait for the time to run out. You can also restart the task, but with the time limit reduced by the time you already spent in the task (we will then pick your individual highest score).
Peter Lehner
 
Posts: 53
Joined: Fri 27. Jun 2014, 14:33

Re: Expected program sequence

Postby lrubio » Thu 23. Oct 2014, 16:39

Peter Lehner wrote:In the final evaluation you can query the list of scene tasks just as now with the list_scenes service. You can then identify the task number from the 'name' field of the task description. You are expected to automatically start and solve each task by calling your solution application in /opt/euroc_c2s1/startup as specified in the technical annex, Section 4.2.

So, are task 'names' going to be different from now?

Thanks,
Luis
lrubio
 
Posts: 13
Joined: Fri 19. Sep 2014, 14:37

Re: Expected program sequence

Postby Peter Lehner » Fri 24. Oct 2014, 11:40

lrubio wrote:So, are task 'names' going to be different from now?

No the task names within the description will remain the same:
'task 1',
'task 2/1', 'task 2/2', 'task 2/3',
'task 3',
'task 4/1', 'task 4/2', 'task 4/3',
'task 5',
'task 6'
Peter Lehner
 
Posts: 53
Joined: Fri 27. Jun 2014, 14:33

Re: Expected program sequence

Postby lrubio » Mon 27. Oct 2014, 10:41

But now exactly task names are:
'task1_v?',
'task2_v?_1', 'task2_v?_2', 'task2_v?_3',
'task3_v?',
'task4_v?_1', 'task4_v?_2', 'task4_v?_3',
'task5_v?',
'task6_v?'

My question is if the task names are going to be exactly that you showed ('task 1', 'task 2/1'...) or we have to process the service response 'list_scenes_srv.response.scenes' to know the exactly name.

Thanks,
Luis
lrubio
 
Posts: 13
Joined: Fri 19. Sep 2014, 14:37

Re: Expected program sequence

Postby fschmidt » Mon 27. Oct 2014, 15:17

please try to distinguish between scene(-file) names and task names.

scene file names could be arbitrary and you should not do any assumptions about them.

task names can only be out of this set:
'task 1',
'task 2/1', 'task 2/2', 'task 2/3',
'task 3',
'task 4/1', 'task 4/2', 'task 4/3',
'task 5',
'task 6'

and yes, you have to use the list-scenes service to get the list of possible scene-name's!

here is a very short python script which will demonstrate this:
Code: Select all
#!/usr/bin/python
import rospy
import yaml
from euroc_c2_msgs.msg import *
from euroc_c2_msgs.srv import *
list_scenes = rospy.ServiceProxy("/euroc_c2_task_selector/list_scenes", ListScenes)
list_resp = list_scenes()
list_resp.scenes.sort(key=lambda scene: scene.name)
for scene in list_resp.scenes:
    print "scene: %-20.20s" % scene.name,
    data = yaml.load(scene.description_yaml)
    print "task name: %r" % data["task_name"]

when this script is run against an up-to-date euroc-c2-simulator you will get this output:
Code: Select all
scene: task1_v1             task name: 'task 1'
scene: task1_v2             task name: 'task 1'
scene: task1_v3             task name: 'task 1'
scene: task2_v1_1           task name: 'task 2/1'
scene: task2_v1_2           task name: 'task 2/2'
scene: task2_v1_3           task name: 'task 2/3'
scene: task2_v2_1           task name: 'task 2/1'
scene: task2_v2_2           task name: 'task 2/2'
scene: task2_v2_3           task name: 'task 2/3'
scene: task2_v3_1           task name: 'task 2/1'
scene: task2_v3_2           task name: 'task 2/2'
scene: task2_v3_3           task name: 'task 2/3'
scene: task3_v1             task name: 'task 3'
scene: task3_v2             task name: 'task 3'
scene: task3_v3             task name: 'task 3'
scene: task4_v1_1           task name: 'task 4/1'
scene: task4_v1_2           task name: 'task 4/2'
scene: task4_v1_3           task name: 'task 4/3'
scene: task4_v2_1           task name: 'task 4/1'
scene: task4_v2_2           task name: 'task 4/2'
scene: task4_v2_3           task name: 'task 4/3'
scene: task4_v3_1           task name: 'task 4/1'
scene: task4_v3_2           task name: 'task 4/2'
scene: task4_v3_3           task name: 'task 4/3'
scene: task5_v1             task name: 'task 5'
scene: task5_v2             task name: 'task 5'
scene: task5_v3             task name: 'task 5'
scene: task6_v1             task name: 'task 6'
scene: task6_v2             task name: 'task 6'
scene: task6_v3             task name: 'task 6'


as you can see: the task name is always one of the above mentioned while the scene-name is something else.

we expect that your solution does something like this:
Code: Select all
list_scenes = rospy.ServiceProxy("/euroc_c2_task_selector/list_scenes", ListScenes)
list_resp = list_scenes()
for scene in list_resp.scenes:
    data = yaml.load(scene.description_yaml)
    task_name = data["task_name"]

    if task_name == "task 1":
        solve_simple_pick_and_place(scene.name)
    elif task_name.startswith("task 2/"):
        solve_simple_pick_and_place_bad_calib(scene.name)
    elif task_name == "task 3":
        solve_mobile_pick_and_place(scene.name)
    elif task_name.startswith("task 4/"):
        solve_mobile_pick_and_place_obstacles(scene.name)
    elif task_name == "task 5":
        solve_puzzle(scene.name)
    elif task_name == "task 6":
        solve_conveyor_belt(scene.name)

alternatively you can also decide the order in which you want to solve the tasks - in the final eval, there will be only one scene-file per task-name:
Code: Select all
list_scenes = rospy.ServiceProxy("/euroc_c2_task_selector/list_scenes", ListScenes)
list_resp = list_scenes()
scene_names = {}
for scene in list_resp.scenes:
    data = yaml.load(scene.description_yaml)
    task_name = data["task_name"]
    scene_names[task_name] = scene.name

def solve_simple_pick_and_place(scene_name):
    start_sim = rospy.ServiceProxy("/euroc_c2_task_selector/start_simulator", StartSimulator)
    resp = start_sim("C2TXX#YYYYYY", scene_name)
    data = yaml.load(resp.description_yaml)
    print "solving simple pick and place..."
    # ...
# ...

solve_simple_pick_and_place(scene_names["task 1"])
solve_simple_pick_and_place_bad_calib(scene_names["task 2/1"]))
solve_simple_pick_and_place_bad_calib(scene_names["task 2/2"]))
solve_simple_pick_and_place_bad_calib(scene_names["task 2/3"]))
solve_mobile_pick_and_place(scene_names["task 3"]))
solve_mobile_pick_and_place_obstacles(scene_names["task 4/1"]))
solve_mobile_pick_and_place_obstacles(scene_names["task 4/2"]))
solve_mobile_pick_and_place_obstacles(scene_names["task 4/3"]))
solve_puzzle(scene_names["task 5"]))
solve_conveyor_belt(scene_names["task 6"]))
fschmidt
 
Posts: 96
Joined: Fri 27. Jun 2014, 14:44

Re: Expected program sequence

Postby joma » Thu 30. Oct 2014, 15:27

If we restart a task because we had an emergency stop, the timout for the second run will be 10minutes minus the time from the last run.
After the restart can we somehow detect how much time is available for the second run? Maybe in the /time_limit parameter (this seems currently not to be implemented as the value is always 600). Also if restarting a task at the moment, the simulator will again timout after 10 minutes and not after the shortened timeout.
We need somehow to find out that we are at the end of the allowed time of a task, otherwise we could run in an infinite loop at a task and not proceed to the next one.
joma
 
Posts: 12
Joined: Tue 29. Jul 2014, 15:15

Re: Expected program sequence

Postby fschmidt » Thu 30. Oct 2014, 16:42

we will release a new euroc-c2s1-simulator_1.0.19_i386.deb package that publishes a new topic named "/remaining_time" which will count down from the time_limit of the yaml spec to 0 (it will stay then at 0). (message type: rosgraph_msgs/Clock)

while the simulator runs in "non-eval" mode this will always start to count-down from 600. this is becaue the "seconds-used" per task is not stored on disc while you are developing your solution.

on the evaluation machines the used seconds will be stored and substracted from this absolute time limit.

example: when you run task1 for 5 minutes and then restart the task you will only have 5 minutes left and /remaining _time will count down from 300 to 0.
fschmidt
 
Posts: 96
Joined: Fri 27. Jun 2014, 14:44

Re: Expected program sequence

Postby joma » Fri 31. Oct 2014, 07:49

When will this update be released? This change in the interface is, at least to my understanding, quite important for a stable handle of the different tasks and shoud therefore be at least once tested. It's less then 2 weeks to go and the test evaluation phase ends today.
joma
 
Posts: 12
Joined: Tue 29. Jul 2014, 15:15

Re: Expected program sequence

Postby fschmidt » Fri 31. Oct 2014, 09:30

this new information (topic /remaining_time) was requested after 4 months into the challenge.

we try to release as fast as possible but transfering >7GB of data for each release from DLR to CNRS/LAAS is not always easy. at the moment we are experiencing packet loss on a DFN host which is not under our control and this takes time to escalate and fix.

you will have to test this new feature in the next 2 weeks on your own setup.
fschmidt
 
Posts: 96
Joined: Fri 27. Jun 2014, 14:44



Similar topics

expected program sequence
Forum: Stage 1 - Simulation
Author: Tobias Fromm
Replies: 2

Return to Stage 1 - Simulation

Who is online

No registered users

cron