Commit e7d73737 authored by lebu's avatar lebu

delete files created by automatic merge

parent b1a67821
Pipeline #188636 passed with stage
in 3 minutes and 38 seconds
/* (c) https://github.com/MontiCore/monticore */
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 = other_actor_id};
tag collisionDetection.stdout with RosConnection = {topic = (/echo, std_msgs/Int64), msgField = data};
}
/* (c) https://github.com/MontiCore/monticore */
package test;
component CollisionDetection{
port in Z other_actor_id,
out Z stdout;
connect other_actor_id -> stdout;
}
/* (c) https://github.com/MontiCore/monticore */
package test;
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.orientation with RosConnection = {topic = (/carla/ego_vehicle/vehicle_status, carla_msgs/CarlaEgoVehicleStatus), msgField = orientation};
tag bumpBot.collision_normale with RosConnection = {topic = (/carla/ego_vehicle/collision, carla_msgs/CarlaCollisionEvent), msgField = normal_impulse};
tag bumpBot.collision_normale_out with RosConnection = {topic = (/carla/ego_vehicle/collision, carla_msgs/CarlaCollisionEvent), msgField = normal_impulse};
}
/* (c) https://github.com/MontiCore/monticore */
package test;
import test.structures.*;
component BumpBot{
ports out Ego_Vehicle test,
in Quaternion orientation,
in Vector3 collision_normale,
out Vector3 collision_normale_out;
implementation Math{
static B inited = false;
static B skip = false;
if skip
skip = false;
else
if inited // Keep values!
collision_normale_out.x = collision_normale.x;
collision_normale_out.y = collision_normale.y;
collision_normale_out.z = collision_normale.z;
else
inited = true;
collision_normale_out.z = -1;
end
test.throttle = 1.0;
test.brake = 0.0;
test.hand_brake = false;
test.gear = 1;
test.manual_gear_shift = false;
Q tmp = asin(orientation.z);
B noCollisionHappened = abs(collision_normale.z+1) < 0.000001;
if noCollisionHappened
test.reverse = false;
test.steer= 0;
else
Q drivingDirX = (1-(abs(tmp)/(M_PI/4)));
Q drivingDirY = 2*tmp/(M_PI/4);
Q collisionOrtogonalDirection = -drivingDirX * collision_normale.y + drivingDirY * -collision_normale.x;
Q collisionDirection = drivingDirX * -collision_normale.x + drivingDirY * collision_normale.y;
Q projectionFactor = collisionDirection / sqrt(drivingDirX * drivingDirX + drivingDirY * drivingDirY);
B turnCompleted = (projectionFactor * drivingDirX * -collision_normale.x) + (projectionFactor * drivingDirY * collision_normale.y) < 0;
if collisionDirection < 0.0 || turnCompleted
test.reverse = false;
test.steer= 0;
skip = true;
else
test.reverse = true;
if collisionOrtogonalDirection > 0.0
test.steer = 0.5;
else
test.steer = -0.5;
end
end
end
end
}
}
package test.structures;
import test.structures.*;
struct Collision{
Z other_actor_id;
Vector3 normal_impulse;
}
package test.structures;
struct Quaternion{
Q x;
Q y;
Q z;
Q w;
}
package test.structures;
struct Vector3{
Q x;
Q y;
Q z;
}
package test.structures;
import test.structures.*;
struct Vehicle_Status{
Q velocity;
Q acceleration;
Quaternion orientation;
Ego_Vehicle ego_vehicle;
}
docker exec -it emam2carla /bin/bash -c 'export PYTHONPATH=/opt/carla/PythonAPI/carla/dist/carla-0.9.5-py2.7-linux-x86_64.egg:/opt/carla/PythonAPI && source /opt/ros/kinetic/setup.bash && cd /usr/src/emam2carla/EMAM2Carla/ && rm -rf target && java -jar ../mw-generator.jar valid.json && target/compile.sh && target/build/test_bumpBot/coordinator/Coordinator_test_bumpBot'
# (c) https://github.com/MontiCore/monticore
docker exec -it emam2carla /bin/bash -c 'source /opt/ros/kinetic/setup.bash && source opt/carla-ros-bridge/devel/setup.bash && /bin/bash'
# (c) https://github.com/MontiCore/monticore
docker run -it --name emam2carla --rm -v $(pwd):/usr/src/emam2carla registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/carlacomponents/emam-carla-ros-bridge
# (c) https://github.com/MontiCore/monticore
curDir=$(readlink -f `dirname $0`)
# (c) https://github.com/MontiCore/monticore
docker build -t registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/carlacomponents/emam-carla-ros-bridge:latest -f Dockerfile ./.. "$@"
docker exec -it emam2carla /bin/bash -c 'source /opt/ros/kinetic/setup.bash && cd /usr/src/emam2carla/EMAM2Carla/ && target/build/test_bumpBot/coordinator/Coordinator_test_bumpBot'
docker exec -it heuristic_wescoff bash -c 'source /opt/ros/kinetic/setup.bash && cd /usr/src/emam2carla/EMAM2Carla/ && rm -rf target && java -jar ../mw-generator.jar valid.json && target/compile.sh && target/build/test_bumpBot/coordinator/Coordinator_test_bumpBot'
docker exec -it heuristic_wescoff bash -c 'source /opt/ros/kinetic/setup.bash && cd /usr/src/emam2carla/EMAM2Carla/ && rm -rf target && java -jar ../mw-generator.jar valid.json && target/compile.sh && target/build/test_bumpBot/coordinator/Coordinator_test_bumpBot'
docker run -it --rm --name emam2carla --mount type=volume,source=//h/Files/git/praktikum/bumpbot,target=/usr/src/emam2carla registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/carlacomponents/emam-carla-ros-bridge bash
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