Skip to content
Permalink
Browse files

Fixes for vrep (#73)

Temp fix solution for spell algorithm to run in vrep
Removed forcing unreal-quad platform in simulations
Minor changes in spell algorithm config
  • Loading branch information...
sedrakGR authored and jredmondson committed Feb 16, 2019
1 parent 1e89a53 commit 3d442048b835f92cdbca67a665cff1510c165502
@@ -51,10 +51,11 @@ def create_plotters_from_config(file_path):
# user_specs = OrderedDict(yaml_loader(file_path))
# user_specs = OrderedDict(user_specs)
# 2. Grab schema file
if user_specs[source_key][capnp_schemas_location]:
schemas = None
if capnp_schemas_location in user_specs[source_key]:
schemas = user_specs[source_key][capnp_schemas_location]
else:
sys.exit('You have not specified schema files')
print 'no schemas location specified'

# 3. Grab source from which to read data (.stk or live transport)
# Checks to see what source is specified (For now cannot be both)
@@ -58,7 +58,6 @@ def capnp_crunch(self, key, value):
new_value = value.to_any().reader()
return new_value


# this is an interface for simulating stk file as a knowledge base
class DataReaderFromFile(DataReaderInterface):

@@ -26,7 +26,7 @@ sub run {
#$cmd = "$cmd -ex \\\"set breakpoint pending on\\\" ";
#$cmd = "$cmd -ex run --args ";

$cmd = "$cmd $gams_root/bin/gams_controller --platform unreal-quad -i $i -n $num --loop-time $time --period $period --queue-length 2000000";
$cmd = "$cmd $gams_root/bin/gams_controller -i $i -n $num --loop-time $time --period $period --queue-length 2000000";
$cmd = "$cmd --madara-file $gams_root/scripts/simulation/madara_init_common.mf";
$cmd = "$cmd $gams_root/scripts/simulation/areas/$area.mf";
$cmd = "$cmd $gams_root/scripts/simulation/$sim/madara_init_common.mf";
@@ -1,4 +1,4 @@
.vrep_port=19921;
.vrep_port=19922;

.initial_lat=40.443431;
.initial_lon=-79.940570;
@@ -1,4 +1,4 @@
.vrep_port=19921;
.vrep_port=19923;

.initial_lat=40.443431;
.initial_lon=-79.940570;
@@ -1,4 +1,4 @@
group.nodes.members.size=20;
group.nodes.members.size=18;
group.nodes.members.0="agent.0";
group.nodes.members.1="agent.1";
group.nodes.members.2="agent.2";
@@ -21,10 +21,10 @@ group.nodes.members.size=20;
group.nodes.members.19="agent.19";


.platform="unreal-quad";
.platform="vrep-uav";

{.prefix}.algorithm = "spell";
{.prefix}.algorithm.args.text = "galois";
{.prefix}.algorithm.args.text = "GALOIS";
{.prefix}.algorithm.args.group = "group.nodes";
{.prefix}.algorithm.args.origin = region.0.0;
{.prefix}.algorithm.args.buffer = 3.0;
@@ -7,9 +7,9 @@
$madara_debug = 0;
$gams_debug = 3;
$period = 1;
$num = 20;
$num = 18;
$sim = "spell";
$area = "large";
$area = "small";
$border = "region.0";
$num_coverages = 0;
$launch_controllers = 1;
@@ -157,7 +157,15 @@ variables::Agents * /*agents*/)
if (i->first == "origin")
{
origin.frame (platform->get_frame ());
origin.from_container (i->second.to_doubles ());
std::vector<double> origin_coords = i->second.to_doubles();
#ifdef _GAMS_VREP_
// vrep coordinates need to be switched, since it gets them in reverse order here
// TODO: this is a quick fix, if in vrep platform correct fix is found this can be removed
double switchValue = origin_coords[1];
origin_coords[1] = origin_coords[0];
origin_coords[0] = switchValue;
#endif
origin.from_container (origin_coords);

madara_logger_ptr_log (gams::loggers::global_logger.get (),
gams::loggers::LOG_DETAILED,

0 comments on commit 3d44204

Please sign in to comment.
You can’t perform that action at this time.