Skip to content

Commit

Permalink
Clearpath Heron USV (#6548)
Browse files Browse the repository at this point in the history
* heron usv project

* swarm

* swarm

* swarm.wbproj

* heron.png

* heron.png and protofile

* keyboard controller and proto head

* Heron.proto header add

* Heron.proto header version change

* ocean.wbt and swarm.wbt change version

* ocean.wbt and swarm.wbt change version

* windows delete artificats

* windows delete artificats

* ocean.sample.png

* Create heron.md

* documents add all of

* new update for heron.md and Heron.proto file

* heron file update

* heron file update

* heron.md changed

* update .wbt

* heron_collision.stl insert Heron.proto

* ocean.wbproj update

* heron.md update

* Update heron.md

* Update projects/robots/clearpath/heron/protos/docs/heron.md

* Update projects/robots/clearpath/heron/protos/docs/heron.md

* format changed

* lidar plate rear removed

* hidden removed

* image update

* changed proto format and obj folder new name is stl

* image size changed

* hidden remove

* changed linear and angular velocity nae

* clearpath heron usv changed icon

* clearpath heron usv changed icon resize 128x128

* removed angularVelocity and lineerVelocity

* removed angularVelocity and lineerVelocity from swarm and ocean world..

* removed angularVelocity and lineerVelocity from swarm and ocean world..

---------

Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com>
  • Loading branch information
harunkurtdev and omichel authored Nov 23, 2024
1 parent a3cc78d commit 1ad0a69
Show file tree
Hide file tree
Showing 16 changed files with 541 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright 1996-2023 Cyberbotics Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from controller import Robot, Keyboard

# Create the Robot instance.
robot = Robot()

keyboard = Keyboard()
keyboard.enable(1000)

# Get the time step of the current world.
timestep = int(robot.getBasicTimeStep())

# Get left and right motors.
left_motor = robot.getDevice('left_motor')
right_motor = robot.getDevice('right_motor')

# Enable position control mode for motors.
left_motor.setPosition(float('inf'))
right_motor.setPosition(float('inf'))

# Set initial velocities.
left_velocity = 0.0
right_velocity = 0.0

# Main loop:
# - perform simulation steps until Webots is stopping the controller
while robot.step(timestep) != -1:
# Read keyboard input.
key = keyboard.getKey()
# Process keyboard input.
if key == ord('W') or key == ord('w'):
left_velocity = 5.0
right_velocity = 5.0
elif key == ord('S') or key == ord('s'):
left_velocity = -5.0
right_velocity = -5.0
elif key == ord('A') or key == ord('a'):
left_velocity = -2.5
right_velocity = 2.5
elif key == ord('D') or key == ord('d'):
left_velocity = 2.5
right_velocity = -2.5
else:
left_velocity = 0.0
right_velocity = 0.0
# Set motor velocities.
left_motor.setVelocity(left_velocity)
right_motor.setVelocity(right_velocity)
182 changes: 182 additions & 0 deletions projects/robots/clearpath/heron/protos/Heron.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
#VRML_SIM R2024a utf8
# license: Copyright Cyberbotics Ltd. Licensed for use only with Webots.
# license url: https://cyberbotics.com/webots_assets_license
# documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/robots/clearpath/heron/protos/Heron.proto
# keywords: robot/wheeled
# Clearpath Heron USV is an autonomous watercraft designed for various marine tasks.
# It features electric propulsion, advanced navigation systems, and integration capabilities for collaborative missions.
# With a streamlined hull and multiple sensor suites including cameras,
# it excels in environmental monitoring, surveillance, and research.

PROTO Heron [
field SFVec3f translation 0 0 0.0 # Is `Pose.translation`.
field SFRotation rotation 0 0 1 0 # Is `Pose.rotation`.
field SFString name "heron" # Is `Solid.name`.
field SFString controller "heron_usv_controller" # Is `Robot.controller`.
field MFString controllerArgs [] # Is `Robot.controllerArgs`.
field SFString window "<generic>" # Is `Robot.window`.
field SFBool synchronization TRUE # Is `Robot.synchronization`.
field MFNode bodySlot [] # Extends the robot with new nodes in the body slot.
]
{
Robot {
translation IS translation
rotation IS rotation
name IS name
model "Clearpath Heron"
controller IS controller
controllerArgs IS controllerArgs
window IS window
synchronization IS synchronization
children [
DEF BODY_SLOT Group {
children IS bodySlot
}
Transform {
translation -0.185 0 0
rotation 0 0 1 1.01503e-06
children [
Shape {
appearance PBRAppearance {
baseColor 0.964706 0.827451 0.176471
metalness 0
}
geometry Mesh {
url [
"../stl/plain-rear-plate.stl"
]
}
}
]
}
Transform {
translation 0 -0.35 0.05
children [
Shape {
appearance PBRAppearance {
baseColor 0.960784 0.760784 0.0666667
metalness 0
}
geometry Mesh {
url [
"../stl/right_panel.stl"
]
}
}
]
}
Transform {
translation 0 0.35 0.05
children [
Shape {
appearance PBRAppearance {
baseColor 0.960784 0.760784 0.0666667
metalness 0
}
geometry Mesh {
url [
"../stl/left_panel.stl"
]
}
}
]
}
Transform {
translation -0.73 0.38 -0.14
children [
Propeller {
device RotationalMotor {
name "left_motor"
maxVelocity 30
}
fastHelix Solid {
rotation 0 1 0 1.57
children [
Shape {
appearance PBRAppearance {
baseColor 0.368627 0.360784 0.392157
}
geometry Cylinder {
height 0.1
radius 0.05
}
}
]
}
}
]
}
Transform {
translation -0.73 -0.38 -0.14
children [
Propeller {
device RotationalMotor {
name "right_motor"
maxVelocity 30
}
fastHelix Solid {
rotation 0 1 0 1.5708
children [
Shape {
appearance PBRAppearance {
baseColor 0.368627 0.360784 0.392157
}
geometry Cylinder {
height 0.1
radius 0.05
}
}
]
}
}
]
}
DEF HERON Shape {
appearance Appearance {
material Material {
diffuseColor 0.239216 0.219608 0.27451
}
texture ImageTexture {
}
textureTransform TextureTransform {
}
}
geometry Mesh {
url [
"../stl/heron_base.stl"
]
}
}
]
name "heron_usv"
immersionProperties [
ImmersionProperties {
fluidName "fluid"
dragForceCoefficients 0.01 0 0
dragTorqueCoefficients 0.05 0 0
viscousResistanceForceCoefficient 400
viscousResistanceTorqueCoefficient 0.1
}
]
boundingObject Transform {
scale 0.1 0.1 0.1
children [
Mesh {
url [
"../stl/heron_collision.stl"
]
}
]
}
physics Physics {
density 400
centerOfMass [
0 0 0
]
damping Damping {
linear 0.5
angular 0.5
}
}
}
}
44 changes: 44 additions & 0 deletions projects/robots/clearpath/heron/protos/docs/heron.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
The [clearpath's Heron USV](https://robots.ros.org/clearpath-heron-usv/) is a USV platform.

### Motors

There are 2 motor, motor name `left_motor`and `right_motor`.
You can add new Camera, GPS or other sensors you want under `body_slot`.

### Movie Presentation

![youtube video](https://www.youtube.com/watch?v=qWRyCnJWVuM)

### Heron PROTO

Derived from [Robot](https://cyberbotics.com/doc/reference/robot).

```js
Heron {
SFVec3f translation 0 0 0
SFRotation rotation 0 1 0 1.5708
SFString name "heron"
SFString controller "heron_usv_controller"
MFString controllerArgs []
SFBool synchronization TRUE
MFNode bodySlot []
}
```

#### Heron Field Summary

- `bodySlot`: Extends the robot with new nodes.

### Samples

You will find the following sample in this folder: "[WEBOTS\_HOME/projects/robots/clearpath/heron/worlds]({{ url.github_tree }}/projects/robots/clearpath/heron/worlds)".

Ocean

#### [heron\ocean.wbt]({{ url.github_tree }}/projects/robots/clearpath/heron/worlds/ocean.wbt)

![ocean.png](images/heron/ocean.jpg) This simulation shows a basicly usv.

#### [heron\swarm.wbt]({{ url.github_tree }}/projects/robots/clearpath/heron/worlds/swarm.wbt)

![swarm.png](images/heron/swarm.jpg) This simulation shows a basicly swarm robotics.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions projects/robots/clearpath/heron/webots.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
publish: true
9 changes: 9 additions & 0 deletions projects/robots/clearpath/heron/worlds/.ocean.wbproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000002000000010000011c00000313fc0200000001fb0000001400540065007800740045006400690074006f00720100000016000003130000004100ffffff0000000300000780000000d9fc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c0100000000000007800000006900ffffff000006620000031300000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff000000010000000200000100000005620100000002010000000100
sceneTreePerspectives: 000000ff000000010000000300000201000000d6000000000100000002010000000200
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
textFiles: -1
consoles: Console:All:All
9 changes: 9 additions & 0 deletions projects/robots/clearpath/heron/worlds/.swarm.wbproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000002000000010000011c000002f1fc0200000001fb0000001400540065007800740045006400690074006f00720100000016000002f10000003f00ffffff0000000300000780000000d9fc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c0100000000000007800000006900ffffff00000662000002f100000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff000000010000000200000100000005620100000002010000000100
sceneTreePerspectives: 000000ff00000001000000030000001c000002b4000000fa0100000002010000000200
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
textFiles: -1
consoles: Console:All:All
Loading

0 comments on commit 1ad0a69

Please sign in to comment.