Commit a7af4230 authored by Lennart Bucher's avatar Lennart Bucher

Merge branch 'BumbBot_test' of...

Merge branch 'BumbBot_test' of git.rwth-aachen.de:monticore/EmbeddedMontiArc/applications/carlacomponents into BumbBot_test
parents e3951122 3683b998
Pipeline #148188 failed
......@@ -2,7 +2,7 @@ package test;
conforms to de.monticore.lang.monticar.generator.roscpp.RosToEmamTagSchema;
tags Bumb{
tag collisionDetection.other_actor_id with RosConnection = {topic = (/carla/ego_vehicle/collision, carla_msgs/CarlaCollisionEvent), msgField = msg.other_actor_id};
tag collisionDetection.other_actor_id with RosConnection = {topic = (/carla/ego_vehicle/collision, carla_msgs/CarlaCollisionEvent), msgField = other_actor_id};
tag collisionDetection.stdout with RosConnection = {topic = (/echo, std_msgs/Int64), msgField = data};
}
......@@ -2,8 +2,8 @@ package test;
component CollisionDetection{
port in Z other_actor_id;
port out Z stdout;
port in Z other_actor_id,
out Z stdout;
connect other_actor_id -> stdout;
}
......@@ -3,7 +3,5 @@ conforms to de.monticore.lang.monticar.generator.roscpp.RosToEmamTagSchema;
tags Bumb{
tag bumpBot.test with RosConnection = {topic = (/carla/ego_vehicle/vehicle_control_cmd, carla_msgs/CarlaEgoVehicleControl)};
tag bumpBot.lane_invasion with RosConnection = {topic = (/carla/ego_vehicle/lane_invasion, carla_msgs/CarlaLaneInvasionEvent), msgField = msg.crossed_lane_markings(1)};
tag bumpBot.collision_actor_id with RosConnection = {topic = (/carla/ego_vehicle/collision, carla_msgs/CarlaCollisionEvent), msgField = msg.other_actor_id};
tag bumpBot.collision_actor_id with RosConnection = {topic = (/carla/ego_vehicle/collision, carla_msgs/CarlaCollisionEvent), msgField = other_actor_id};
}
......@@ -4,7 +4,6 @@ import test.structures.*;
component BumpBot{
port out Ego_Vehicle test,
in Z lane_invasion,
in Z collision_actor_id;
implementation Math{
......@@ -14,14 +13,6 @@ component BumpBot{
test.reverse = false;
test.gear = 1;
test.manual_gear_shift = false;
if lane_invasion > 0 //if a lane was crossed change the steering direction
if test.steer == 0.0
test.steer = 0.3;
else
test.steer = (-1) * test.steer;
end
end
if collision_actor_id > 0 //if a collision occurred drive into the other direction
if test.reverse == false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment