Agrarsense
|
Topic | Link |
---|---|
Getting Started | Getting Started |
Using the Simulator | Using the Simulator |
Using Vehicles | Using Vehicles |
Using Walkers | Using Walkers |
Sensors | Sensors |
Setupping sensors | Setupping sensor |
Creating own levels | Creating own levels |
Building from source on Linux | Building on Linux |
Building from source on Windows | Building on Windows |
Installing on Linux | Installing on Linux |
Installing on Windows | Installing on Windows |
To spawn Forwarder with or without sensors, you can utilize ROS Commands topic SpawnObjects {full_path.json}
ROS Command.
With this command, the simulator loads and parses the .json file and if successfull, vehicle is spawned with sensor(s) if defined. Example .json file structure below. To ensure your JSON file is properly structured for Forwarder spawning, you can refer to our example JSON files.
Forwarder:
Check Setup Sensors on how to setup the sensors.
Inputs for driving forward is WASD
Inputs for the boom is assigned to the numpad and letter keys:
Numpad 8 / I = whole boom up Numpad 2 / K = whole boom down
Numpad / T = reaching boom up Numpad / G = reaching boom down
Numpad 4 / J = whole boom left numpad 6 / L = whole boom right
Numpad + / U = Extension boom in numpad - / O = Extension boom out
Breakdown:
Angular.y = Throttle/Brake (value = between -1 and 1) Linear.y = Steer vehicle left, right (Value = between -1 and 1)
Example of driving forward:
Rostopic pub /AGRARSENSE/Forwarder/Movement geometry_msgs/Twist [0,1,0] [0,0,0]
Example of driving backwards / breaking:
Rostopic pub /AGRARSENSE/Forwarder/Movement geometry_msgs/Twist [0,-1,0] [0,0,0]
Example of driving forward and turning left:
Rostopic pub /AGRARSENSE/Forwarder/Movement geometry_msgs/Twist [0,1,0] [0,-1,0] -r 30
Steering vehicle command must be sent continuously in order to keep streeting
Linear is for the grapple & Extended boom
Breakdown:
Angular.x = Outerboom movement up, down (value = degrees) Angular.y = Innerboom movement up, down (value = degrees) Angular.z = Whole boom rotation left, right (value = degrees)
Linear.x = Boom extension in, out Linear.y = Grapple open, close (value = degrees) Linear.z = grapple rotation left, right (value = degrees)
Example of rotating the whole boom:
Rostopic pub /AGRARSENSE/Forwarder/BoomMovement geometry_msgs/Twist [0,0,1] [0,0,0] -r 30
This has to be continuous movement in order to rotate the boom 1 degrees in every tick.
To spawn Drone with or without sensors, you can utilize ROS Commands topic SpawnObjects {full_path.json}
ROS Command.
With this command, the simulator loads and parses the .json file and if successfull, vehicle is spawned with sensor(s) if defined. Example .json file structure below. To ensure your JSON file is properly structured for Drone spawning, you can refer to our example JSON files.
You can add Sensors to Drone via user interface, which you can then save into preset (shows in garage preset) or export into .json file so it can be re-used easily without needing to setup the Drone each time.
1) Spawn Drone via user interface or via ROS.
2) Right click the Drone and context menu should appear.
3) Click "Move to Garage"
4) Setup sensors in "Garage". Check Setup Sensors on how to setup the sensors.
5) To export Drone and its sensor(s) click Export.
.json file will be exported to SIMULATION_ROOT/Data/ExportedJsonFiles/ and it will look something like below.
Example .json structure below.
The Drone will roam randomly around the map until it is destroyed, or it receives controls commands through ROS.
Example .json structure below.
Drone will follow the given path until it is gets to the end, and if the droneEndAction is "Destroy" it will destroy itself.
If the drone receives any controls commands through ROS while following the given path, drone will stop following the given path.
Controlling the drone when manual flightmode happens in /Agrarsense/BP_Drone_C_0/Movement
Topic Message type is geometry_msgs/Twist:
Linear controls the Roll, Angular controls the Pitch and Yaw
(Example moving script in Agrarsense\Examples\ROS1\drone_movement.py)
To move Drone another location, you can utilize ROS Commands topic MoveDroneTo drone {x,y,z}
ROS Command.
It will automatically override roaming mode to head to this position.
id = ID of Actor
X,Y,Z = Destination
MoveDroneToAndDestroy {ID} {x,y,z}
StopDrone {ID}
ResumeDrone {ID}
TeleportById {ID} {x,y,z}