This blog post is about our current EV3 robot we're planning to use in the 2023/2024 FLL competition. Some features: 2 large motors for steering. 2 medium motors for attachments. 2 colour sensors for picking up the white and black lines, also used for line squaring. 1 gyro sensor. To enable attachments to be changed as quickly as possible we're using gravity to keep the gears connected, i.e. you don't need to fasten anything to the robot. Every attachment has 2x 12 tooth double bevel gear (part 32270) which comes in contact with the 2x 20 tooth double bevel gears (part 32269) on the robot. The medium motors are horizontally aligned on the robots, but we use 12 tooth double bevel gears to convert that to vertical alignments. These in turn are connected to 20 tooth double bevel gears, and the attachments in turn connect to these 20 tooth double bevel gears with their 12 tooth double bevel gears. The complete robot is modelled in Bricklink Studio 2 . You can download the rob
DummyNet allows us to shape a network (latency, upload &
download speeds). It runs on FreeBSD. In this example Hyper-V will be used to
create a VM that acts as a bridge between two networks (switches).
Create new private switch
You also need to create a new private switch. The idea is
that DummyNet will be installed between a server and your normal network
(switch). So instead of connecting the server to your normal switch, connect it
to the private switch. DummyNet will act as a bridge between the private switch
& normal switch, meaning traffic on one network will be replicated to the
other network and vice versa, plus it will shape the traffic.
Install FreeBSD
Download FreeBSD 10. You only need the CD ISO as we’ll
install a bare system.
Create a new VM called DummyNet with 128 Mb RAM, 2GB
harddisk and 2 network interfaces. The first interface must be connected to
your normal network, and the second interface to your private network created
above.
Important: On both network adapters enable MAC Address
Spoofing (under Advanced section). This must be enabled for the bridge to work.
Install FreeBSD. Do not install any
additional packages.
Partition: Select Guided, whole disk and click on Finish
On network configuration select Cancel – we’ll do the
configuration later.
Reboot the system & log in.
Create /etc/rc.conf.local with the following contents:
cloned_interfaces="bridge0"
ifconfig_bridge0="addm hn0 addm hn1"
ifconfig_hn0="up"
ifconfig_hn1="up"
Restart.
Test Bridge
To test the bridge, create another VM with one network
adapter linked to your private network. From this VM you should be able to
access the normal network as before. If you can’t it means there is something
wrong with your bridge configuration.
Configure DummyNet
Edit /boot/loader.conf and add
dummynet_load="YES"
autoboot_delay="-1"
The autoboot delay is optional – this will override the
default 10s delay when booting.
Edit /etc/sysctl.conf and add
net.link.bridge.ipfw=1
net.link.ether.ipfw=1
firewall_enable="YES"
firewall_type="open"
firewall_script="/etc/ipfw.rules"
ipfw -q flush
ipfw add pipe 1 ip from any to any
Reboot.
Confirm you can access your network from your private
network. If not something is wrong with your DummyNet configuration.
Now configure your network for a latency of 100ms and bandwith of 1024kbits/s with no packet loss. On the DummyNet VM, log in &
type the following command:
ipfw pipe 1 config delay 100ms bandwidth 1024kbit/s plr 0The delay is the latency (100ms is a very slow network), bandwith is the speed for uplink & downlink, plr is packet loss ratio, set to a non-zero value to simulate lost packets - 0.01 means 1% of the packets will be lost.
To view the current status:
ipfw pipe 1 showEnjoy!
Comments