Camera
Description
Reads Cameras: Which are GigE Vision or U3V (Usb3 Vision, via USB3 Cable).
Usage
Settings are defined in the config/Cameras
Emits
message::input::Image
Dependencies
- Aravis
FakeCamera
Description
Loads compressed images (JPEGs) and corresponding lens parameters (YAML files) from the specified folder and emits them as CompressedImage messages
Images are and lens files are expected to be named using a common theme (e.g. image000001.jpg and lens000001.yaml).
Usage
In the config file set image_folder to be the path to the folder containing the image and lens files, image_prefix to the portion of the filename that is common to all image files and lens_prefix to the portion of the filename that is common to all lens files.
image_folder: 'images'image_prefix: 'image'lens_prefix: 'lens'All images are assumed to be JPEGs with either a .jpg or .jpeg extension. All lens files are assumed to be YAML files with a .yaml extension.
Lens files should contain the following information
projection: EQUISOLID # Either RECTILINEAR, EQUIDUSTANT, or EQUISOLIDfocal_length: 420 # Un-normalised focal length in pixelscentre: [0, 0] # Distance between the camera centre axis and optical axis in pixels (measured from the centre of the image)k: [0, 0] # Distortion coefficientsfov: 1.59286 # Field of view in radiansHoc: # Camera to observation plane (world) homogeneous transformation - [-0.308872, 0.945477, 0.103304, 0] - [-0.84664, -0.223831, -0.482805, 0] - [-0.433359, -0.236586, 0.869613, 0.9] - [0, 0, 0, 1]Emits
message::output::CompressedImagewith aJPEGFOURCC code
Dependencies
- Eigen
- libjpeg-turbo
Game Controller
Description
Listens for RoboCup GameController UDP broadcast packets, converts them into NUClear messages, and maintains a canonical message::input::GameState.
The module also sends periodic and state-dependent reply packets back to the GameController (alive, penalised, unpenalised).
Usage
Install module::input::GameController in the powerplant.
This module is configured by GameController.yaml and consumes:
message::support::GlobalConfigforteam_idandplayer_id
At runtime it:
- Listens for UDP broadcast packets on
receive_port - Accepts only supported packet version
12 - Optionally filters incoming packets by source IP using
udp_filter_address - Tracks the sender address and sends reply packets to that address on
send_port - Sends
ALIVEreply packets every 2 seconds
Emits
message::input::GameStatemessage::input::GameState::Phasemessage::input::GameState::Modemessage::input::GameState::TeamColourmessage::input::GameEvents::Scoremessage::input::GameEvents::GoalScoredmessage::input::GameEvents::Penalisationmessage::input::GameEvents::Unpenalisationmessage::input::GameEvents::CoachMessagemessage::input::GameEvents::HalfTimemessage::input::GameEvents::BallKickedOutmessage::input::GameEvents::KickOffTeammessage::input::GameEvents::GamePhasemessage::input::GameEvents::GameMode
Also sends UDP GameController reply packets (PENALISED, UNPENALISED, ALIVE) via emit<Scope::UDP>(...).
Dependencies
- NUClear UDP networking (for broadcast receive and unicast reply)
ImageDecompressor
Description
Decompresses images that are in JPEG format to raw images, using a variety of decompressors. It will use decompressors in order until it finds a free one to compress the image. In the event that no compressors are currently free it will drop the image.
Usage
Triggers on message::output::CompressedImage
Configuration from ImageDecompressor.yaml
Emits
message::input::Image
Dependencies
- TurboJPEG
NatNet
Description
Receives OptiTrack NatNet motion-capture packets and converts them into message::input::MotionCapture.
The module listens to NatNet data broadcasts, pings the discovered server, requests model definitions, and then parses frame packets into NUbots mocap messages.
In the Motive software, ensure the advanced streaming settings are set to the following:
Motive Streaming Settings
Broadcast Frame Data: On Local Interface: <motive_device_ip> # Set to the ip of the device running motive, sometimes toggling on/off needed
Marker Options
- Labeled Markers: Off
- Unlabeled Markers: Off
- Asset Markers: Off
Rigid Body Options
- Rigid Bodies: On
- Skeletons: Off
- Skeleton Coordinates: Global
- Skeleton As Rigid Bodies: Off
- Bone Naming Convention: Motive
- Up Axis: Z Up
Miscellaneous
- Remote Trigger: Off
- Transmission Type: Multicast
- Subject Prefix:
- Visual3D Compatible: Off
- Scale: 1
Networking
- Command Port: 1510
- Data Port: 1511
- Multicast Interface:
239.255.42.99 - Multicast as Broadcast: On
- Socket Size: 1000000
Usage
Install module::input::NatNet and configure NatNet.yaml.
Default configuration values:
multicast_address: 239.255.42.99command_port: 1510data_port: 1511dump_packets: falsemax_delay_samples: 100
At runtime the module:
- Binds UDP sockets for NatNet command and data traffic
- Detects the active NatNet server from incoming broadcast packets
- Sends a NatNet ping and reads the remote protocol version
- Requests model definitions when needed
- Estimates and logs network delay statistics
Consumes
extension::ConfigurationfromNatNet.yamlNUClear::UDP::Packet(NatNet command traffic)NUClear::UDP::PacketviaUDP::Broadcastondata_port(NatNet frame traffic)
Emits
message::input::MotionCapture
Dependencies
- An OptiTrack motion capture system sending packets over the network using the NatNet protocol.
Sensor Filter
Description
Uses a Unscented Kalman filter to filter the raw incoming data, and provide clean platform agnostic data.
We assume that the IMU (accelerometer and gyroscope) are oriented to conform with the standard coordinate system x-axis out the front of the robot y-axis to the left z-axis up
For the accelerometer the orientation should be as follows x axis reports a +1g acceleration when robot is laying on its back y axis reports a +1g acceleration when robot is laying on its right side z axis reports a +1g acceleration when robot is vertical
Usage
When installed, it will read incoming message::platform::RawSensors objects and pass them through the kalman filter.
The resulting filtered data will then be outputted as message::input::Sensors to be used by the rest of the system.
Consumes
message::platform::RawSensorsin order to filter them.
Emits
message::input::Sensorswith filtered data from the input.message::input::ButtonLeftDownwhen button pressed.message::input::ButtonLeftUpwhen button released.message::input::ButtonMiddleDownwhen button pressed.message::input::ButtonMiddleUpwhen button released.message::eye::DataPointif log_level >= DEBUG, indicating if feet are down.