Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
CarlaComponents
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
applications
CarlaComponents
Commits
b3290c6a
Commit
b3290c6a
authored
Sep 25, 2019
by
Helge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor bug fixes and changed directory structure
parent
67ee34bc
Pipeline
#187180
failed with stage
in 57 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
43 additions
and
36 deletions
+43
-36
Bumpbot/Bumpbot.json
Bumpbot/Bumpbot.json
+3
-3
Bumpbot/models/Bump.tag
Bumpbot/models/Bump.tag
+2
-2
Bumpbot/models/bumper/BumpBot.emam
Bumpbot/models/bumper/BumpBot.emam
+31
-24
Bumpbot/models/bumper/structures/Collision.struct
Bumpbot/models/bumper/structures/Collision.struct
+2
-2
Bumpbot/models/bumper/structures/Ego_Vehicle.struct
Bumpbot/models/bumper/structures/Ego_Vehicle.struct
+1
-1
Bumpbot/models/bumper/structures/Quaternion.struct
Bumpbot/models/bumper/structures/Quaternion.struct
+1
-1
Bumpbot/models/bumper/structures/Vector3.struct
Bumpbot/models/bumper/structures/Vector3.struct
+1
-1
Bumpbot/models/bumper/structures/Vehicle_Status.struct
Bumpbot/models/bumper/structures/Vehicle_Status.struct
+2
-2
No files found.
Bumpbot/Bumpbot.json
View file @
b3290c6a
{
"modelsDir"
:
"
Bumpbot/
models/"
,
"outputDir"
:
"
Bumpbot/
target/"
,
"rootModel"
:
"
test
.bumpBot"
,
"modelsDir"
:
"models/"
,
"outputDir"
:
"target/"
,
"rootModel"
:
"
bumper
.bumpBot"
,
"generators"
:
[
"cpp"
,
"roscpp"
]
}
Bumpbot/models/Bump.tag
View file @
b3290c6a
/*
(
c
)
https
://
github
.
com
/
MontiCore
/
monticore
*/
package
test
;
package
bumper
;
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
.
vehicle_control
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
};
...
...
Bumpbot/models/
test
/BumpBot.emam
→
Bumpbot/models/
bumper
/BumpBot.emam
View file @
b3290c6a
/*
(
c
)
https
://
github
.
com
/
MontiCore
/
monticore
*/
package
test
;
import
test
.
structures
.*;
package
bumper
;
import
bumper
.
structures
.*;
component
BumpBot
{
ports
out
Ego_Vehicle
test
,
ports
out
Ego_Vehicle
vehicle_control
,
in
Quaternion
orientation
,
in
Vector3
collision_normale
,
out
Vector3
collision_normale_out
;
out
Vector3
collision_normale_out
;
implementation
Math
{
static
B
inited
=
false
;
static
B
skip
=
false
;
...
...
@@ -20,39 +21,45 @@ component BumpBot{
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
;
collision_normale_out
.
z
=
-
1
;
end
vehicle_control
.
throttle
=
1.0
;
vehicle_control
.
brake
=
0.0
;
vehicle_control
.
hand_brake
=
false
;
test
.
gear
=
1
;
test
.
manual_gear_shift
=
false
;
vehicle_control
.
gear
=
1
;
vehicle_control
.
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
)));
vehicle_control
.
reverse
=
false
;
vehicle_control
.
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
;
if
collisionDirection
<
0.0
||
turnCompleted
vehicle_control
.
reverse
=
false
;
vehicle_control
.
steer
=
0
;
skip
=
true
;
else
test
.
reverse
=
true
;
if
collisionOrtogonalDirection
>
0.0
test
.
steer
=
0.5
;
vehicle_control
.
reverse
=
true
;
if
collisionOrtogonalDirection
>
0.0
vehicle_control
.
steer
=
0.5
;
else
test
.
steer
=
-
0.5
;
vehicle_control
.
steer
=
-
0.5
;
end
end
end
end
end
end
}
}
Bumpbot/models/
test
/structures/Collision.struct
→
Bumpbot/models/
bumper
/structures/Collision.struct
View file @
b3290c6a
package
test
.
structures
;
import
test
.
structures
.*;
package
bumper
.
structures
;
import
bumper
.
structures
.*;
struct
Collision
{
Z
other_actor_id
;
...
...
Bumpbot/models/
test
/structures/Ego_Vehicle.struct
→
Bumpbot/models/
bumper
/structures/Ego_Vehicle.struct
View file @
b3290c6a
/*
(
c
)
https
://
github
.
com
/
MontiCore
/
monticore
*/
package
test
.
structures
;
package
bumper
.
structures
;
struct
Ego_Vehicle
{
Q
throttle
;
...
...
Bumpbot/models/
test
/structures/Quaternion.struct
→
Bumpbot/models/
bumper
/structures/Quaternion.struct
View file @
b3290c6a
package
test
.
structures
;
package
bumper
.
structures
;
struct
Quaternion
{
Q
x
;
...
...
Bumpbot/models/
test
/structures/Vector3.struct
→
Bumpbot/models/
bumper
/structures/Vector3.struct
View file @
b3290c6a
package
test
.
structures
;
package
bumper
.
structures
;
struct
Vector3
{
Q
x
;
...
...
Bumpbot/models/
test
/structures/Vehicle_Status.struct
→
Bumpbot/models/
bumper
/structures/Vehicle_Status.struct
View file @
b3290c6a
package
test
.
structures
;
import
test
.
structures
.*;
package
bumper
.
structures
;
import
bumper
.
structures
.*;
struct
Vehicle_Status
{
Q
velocity
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment