1 Introduction

For humans, social animals can either be considered as a necessity, for instance in the case of a cattle herd, or a threat in the case of a medusa swarm. In both cases, the control of those societies could improve human welfare.

In recent years, with the progress of technology, especially in the robotic field, it became possible to create robotic lures that could generate relevant signals to control an animal society [1]. Once accepted by the society of animals as conspecific, the artificial agents could change the animal collective choice while also adapting to the animal society. One of the first concrete examples was the LEURRE project, where a mixed society consisting of cockroaches and mobile robots was created [2]. These types of experiments have been extended to more complex species, such as beetles [3], crickets [4] or even chicken [5], however, LEURRE was the only study in which the loop of interaction between the robots and the animal collective system was closed.

The group behavior of the zebrafish Danio Rerio, a fish used in many laboratories worldwide for different scientific topics [6], raised the interest of biologists, and several examples of automated lures designed to interact with zebrafish have already appeared. For instance, in [79], the zebrafish response to a robotic fish with the same ratio size as zebrafish, a beating tail and different colorations was observed. In [1012], a lure attached to a support is moved using a mobile robot outside the aquarium and controlled using a tracking software. To our knowledge, none of these studies showed a significant acceptance of the artificial agents by the living fish.

In this study, we propose an innovative system to interact with the shoal of fish. We used biomimetics approach to design a robotic fish lure for direct underwater interaction with fish: RiBot, which is only 1.8 times bigger than a standard size zebrafish, with the same ratio dimensions (RiBot is a combination of the word Riba that means fish in Russian language and the word Robot). It is composed of an actuated tail (caudal peduncle) that can beat with frequencies up to 20 Hz and amplitude of \(\pm 23^\circ\), which are in the range of the caudal peduncle beating movements measured on our own zebrafish. RiBot is waterproof and totally autonomous with an internal Lithium Polymer (LiPo) battery and Infrared (IR) receptor for wireless control. Furthermore, RiBot can be magnetically coupled with an external mobile robot, FishBot, developed during preliminary research and that can reach similar speeds and accelerations to zebrafish [13, 14]). When compared to previously published solutions, our solution is combining a mobile robot outside of water as presented in [1012] and a robotic lure as in [79] with smaller size. This allows us to have many different stimuli generated by the device to monitor the zebrafish society.

We performed experiments using this robotic system and measured its impact on the fish behavior. We measured the fish attractiveness while varying the amplitude and the frequency of the beating tail of RiBot, which was itself moving inside the aquarium with different linear speeds. Results from these experiments will help scientists to better understand the types of interaction between fish that lead to formation of shoal and to collective choices.

2 Hardware design

The design of underwater autonomous vehicle is always of great challenge, especially at very low scale. The device should be waterproof, wireless and, moreover in the case of this study, the robot has to interact with zebrafish and thus its size shall be in the range of zebrafish, whose average length rarely exceed 45 mm in laboratory conditions. Due to the size of the selected components, the length of RiBot was fixed at 75 mm while keeping the same ratio size as zebrafish, with a width of 10 mm and a height of 17 mm. For the first prototype, we have decided to include only one actuator, a stepper motor to actuate the tail, a rechargeable battery LiPo to allow the energy autonomy of the device and an infrared receiver to remotely control the device underwater. Figure 1 shows the different hardware subsystems of RiBot that will be described in the following subsections.

Fig. 1
figure 1

Hardware schematic of RiBot

2.1 Actuator

There are several solutions that can be found in the literature to actuate a fish-like underwater vehicle tail or fin [15]. Concerning RiBot, a very small actuator that consumes very low energy but with enough torque to actuate a robotic fish caudal peduncle underwater was required. The actuator should also allow beating tail frequencies and amplitudes in the range of the zebrafish.

We considered a kinematic fish model shown in Fig. 2 to determine the required motor specifications. To simplify the model, we assumed that the caudal peduncle is a rigid body that does circular motion centered on the motor shaft.

If \(\theta\) is the angle between the tail and the longitudinal axis, the motion equation can be expressed by Eq. 1, where I is the inertial moment of the caudal peduncle, L is the length of the caudal peduncle, \(F_\mathrm{d}\) is the driven force of the motor, \(F_\mathrm{w}\) is the resistance of the water that is approximated as the drag force only (Eq. 2) and \(F_\mathrm{e}\) is the resistance force of the elastic skin with coefficient k that envelop the caudal peduncle and this resistance will thus be unbalanced on each sides of the caudal peduncle (Eq. 3).

$$\begin{aligned} I\ddot{\theta }= \frac{F_\mathrm{d}L}{2}-\frac{F_\mathrm{w}L}{2}-\frac{F_\mathrm{e}L}{2} \end{aligned}$$
(1)
$$\begin{aligned} F_\mathrm{w}=\frac{1}{2}C_{D}A{\rho }\left(\frac{L\dot{\theta }}{2}\right)^{2} \end{aligned}$$
(2)
$$\begin{aligned} F_\mathrm{e} = \frac{kL\theta }{2} \end{aligned}$$
(3)

Using Eqs. 13, we obtained a minimal value of 2 mNm for the torque needed for the actuator and selected a micro step gear motor “MF03G” of Seiko Precision Inc. to fulfill this. The motor has very small dimensions and can thus be easily integrated inside RiBot design. The advantage of using a stepper motor is that if the motor does not miss any steps, the position of the caudal peduncle can be estimated from the number of pulses emitted to drive the motor.

Fig. 2
figure 2

The model of the tail (caudal peduncle) used to estimate the needed torque for the actuator

2.2 Communication

IR communication was chosen to remotely control RiBot. Indeed, Wi-Fi and bluetooth involve bulky chips and more power resources which was not affordable for this design. An IR sensor TSOP75436WTT is placed on the back of RiBot (Fig. 4) and IR signal can be sent from any direction to control the device underwater. The RC5 protocol is implemented and thus universal TV remote control with RC5 protocol can be used to control the device. RiBot was placed below a 10 cm water layer and the signal, emitted at 2 m from the water surface, could be perceived by the robot.

2.3 Power

In Sect. 2.1 we described the stepper motor selected to drive the caudal peduncle with the required voltage and current. As the other electronic components had very low power consumption, the motor power consumption was used to select the capacity of the battery (C) using the following equation

$$\begin{aligned} C = \frac{V}{R}T \end{aligned}$$
(4)

where V is the necessary voltage, R is the internal resistance of the motor and T is the desired duration of the experiment which was set to 30 min.

We obtained a required value of 52 mAh in capacity. As it was not possible to find a battery with very small size and the required capacity, we selected the SparkFun 40 mAh small LiPo battery. This battery is rechargeable, which gives the advantage that we do not need to change it on the device when it is empty. Indeed, the battery can be recharged through the eyes of the fish that are made of brass and that cross the Polyurethane layer to be accessed from the outside of RiBot (Fig. 4). A charge circuit was designed to manage the powering of the device and the recharging of the battery.

2.4 Electronic design

The main skeleton of RiBot consists of a Printed Circuit Board (PCB) of 1.6 mm width. All the components are soldered on the two faces of the PCB and are encapsulated with an impermeable coating made of Polyurethane.

The caudal peduncle of the fish is made of brass and connected to the ground (GND). It can be used for two purposes (Fig. 3): it can turn ON and OFF the device and also can be used to calibrate the tail position. When the caudal peduncle reaches one of its maximal position, a contact is made between pads on the PCB and the caudal peduncle. When the device is turned OFF and the tail reaches one of the two pads, the microcontroller is switched ON.

Fig. 3
figure 3

Schematic of the switch system for the tail. The actuator is fixed on the PCB and actuates the tail. Two contact pads (X1 and X2) on the PCB will allow a contact with the fin when it reaches one of the two maximal position (b, c). This will either turn ON the device if it was turned OFF or either generate a break on the microcontroller to calibrate the fin position to find the zero position (a)

The PCB carries a microcontroller STM32f103. This microcontroller was selected due to its very small dimensions (6 mm \(\times\) 6 mm) and its functionalities.

The actuator is driven using a dual full-bridge A3901 also selected for its small dimensions (3 mm \(\times\) 3 mm \(\times\) 0.75 mm), its operating range for voltage (2.5–5.5V) and current (±400 mA).

Fig. 4
figure 4

Skeleton of RiBot: a dual H-bridge A3901. b Tail (caudal peduncle). c Ring. d Stepper motor. e IR receiver. f LiPo battery. g Eyes used as contacts to recharge the battery and reference during molding. h Microcontroller STM32f103. i Connector used for debug purposes

2.5 Mechanical design

The motor with the tail docked on its axis is fixed inside a 3D part, called the ring as it has an elliptical external shape, that is glued on the PCB.

To isolate the actuator and the caudal peduncle from water and to create a soft skin that can mimic the tail of the zebrafish, an undercut of the tail was made in 3D printing and was dipped into liquid latex. The skin created was unmolded and attached on the ring using silicone. The caudal fin is also made of latex and is prepared apart from the tail using another mold, and is glued on the tail using latex.

Polyurethane is used to isolate the electronics from water. A mold with the desired undercut of Ribot was made of ABS by 3D printing. The mold is composed of two parts that are joined using pins and screws during the molding process to press the two parts against each other. The PCB is placed inside the mold and the eyes are used as a reference inside the mold. Finally, liquid polyurethane is injected inside the mold from the tail. The Polyurethane coats the entire PCB up to the ring and hardens inside the mold. After this process, RiBot is totally isolated from water and can start to swim underwater (Figs. 4, 5).

3 Performance evaluation

Figure 5 shows the prototype of RiBot in comparison with one of our zebrafish Danio Rerio. The final prototype has a mass of 9.0 g and sinks beneath the water surface due to its density.

Fig. 5
figure 5

The prototype of RiBot, compared with a zebrafish Danio Rerio used during the experiments. This figure shows the 1.8 ratio between the lure and a real zebrafish. RiBot is equipped with the Latex socket enclosing the tail and was molded inside Polyurethane to isolate the PCB from water. RiBot is mounted on a base composed of a tiny carbon stick and an iron plate. Magnets are attached to the iron plate to magnetically couple RiBot with a mobile robot moving below the experimental tank

3.1 System qualifications

The first prototype of RiBot presented in Fig. 5 was inserted inside water to measure its capabilities.

We could perform 23 min long test with the tail of RiBot moving continuously using the embedded LiPo battery. However, when reducing the use of the actuator, RiBot could be maintained turned ON for more than 1 h underwater.

To measure the beating tail of RiBot, we used the same experimental setup that was used to perform the experiments with fish presented in Fig. 7. We installed a color marker on the edge of the tail and above the position of the actuator axis and tracked these markers from top view using a camera.

We obtained a maximum amplitude of 23\(^\circ\) and a frequency of 20 Hz. This corresponds to the amplitude and vibrations that we have observed on our own zebrafish. Indeed, in rare cases, the zebrafish can move the tail at an angle of almost 90\(^\circ\), but in general, the amplitude does not exceed 20\(^\circ\).

3.2 Motion underwater

RiBot was primarily designed to simply beat its tail to increase its attractiveness towards real zebrafish. However, we discovered that the actuated tail could also be used to propel RiBot underwater autonomously without using another robot to propel it. The one degree of freedom actuator, which actuates the caudal peduncle, coupled with the thin caudal fin (Fig. 5), allow the device to move autonomously underwater with speeds up to 2.5 cm s\(^{-1}\), using a floating element to stabilize it as no elements to control buoyancy are implemented yet. This maximal speed is in the range of some results obtained with micro underwater vehicles [16, 17].

We measured the linear speed of RiBot underwater with all the different possible amplitudes and frequencies. One can observe in Fig. 6 that RiBot swims slightly faster at high amplitude than at high frequency. The maximal speed of 25 mms\(^{-1}\) is obtained at an amplitude of 22\(^\circ\) and a beating rate of 1 Hz.

Fig. 6
figure 6

Average linear speed of RiBot underwater in function of the amplitude and the beating rate of the tail. The value of 0 corresponds to the cases beyond the motor capabilities and thus impossible

4 Behavioral experiments

To qualify RiBot for behavior studies with zebrafish, we designed an experiment to test the attractiveness of the device among a group of living zebrafish.

4.1 Experimental setup

The experimental setup that was used for the experiments consisted of an aquarium of 1000 mm \(\times\) 1000 mm of surface covered on the inside with white teflon sheets (Fig. 7). These sheets are installed to avoid reflection on the glass and to have a smooth surface for the motion of the lure module inside the aquarium. The tank is filled with water up to a level of 60 mm. According to [6], this level of water is not introducing more stress for the fish and furthermore, the lure, whose height cannot vary, will be more visible for the fish that are swimming around. The water temperature is set to 26 °C, as suggested by [6]. A mobile robot, FishBot, designed also in our laboratory, is moving under the aquarium, and the motion is transmitted to RiBot using magnets. FishBot is powered using two conductive plates, one glued on the bottom of the aquarium and one on the support on which the mobile robot is moving.

Inside of the tank, a structure made of white teflon bands of 1 mm width and 8 cm height constrains the fish into a 10 cm large circular corridor (Fig. 8).

Fig. 7
figure 7

Experimental setup used during the experiments. a Aquarium of 1000 mm \(\times\) 1000 mm \(\times\) 250 mm. b Water layer of 60 mm depth. c FishBot mobile robot moving under the aquarium. d Conductive plates to power the mobile robot. e RiBot inside the aquarium linked to the mobile robot through magnetic coupling. f Living zebrafish. g Walls of the circular corridor to constrain the mobile robot. h Walls of the circular corridor to constrain the zebrafish. i Camera used to track the lure and the zebrafish. j Computer that process the camera frames and remotely controlled the robot via Bluetooth protocol

4.2 Tracking

During the experiments, video frames were grabbed by a high-definition webcam placed on top of the setup. The frames were retrieved on a computer and a blob detection based algorithm extracted the position of RiBot and the zebrafish (Fig. 8). The data acquired during the experiments were then processed using Matlab. The tracking did not allow to identify the fish but only detect their positions, and sometimes the detection could be disturbed if for instance two fish are very close to each others. However, the tracking was precise enough to measure the location of the fish majority in the experimental setup and thus measure the swimming direction of the fish shoal.

Fig. 8
figure 8

The experimental setup grabbed from the top by the high-definition webcam, with the result of the blob detection based software. RiBot (in blue) can be easily differentiated from the five zebrafish (in red) thanks to its larger size. The inner circle and the outer circle have a diameter of approximatively 40 and 60 cm respectively, thus the fish are constrained in a corridor of 10 cm width (color figure online)

4.3 Animals

The experiments performed in this study were conducted under the authorization N\(^\circ\)2778 delivered by the Department of Consumer and Veterinary of the Canton de Vaud (Switzerland) after submission to the state ethical board for animal experiments.

For the experiments performed, we used 50 wild-type zebrafish Danio Rerio, with short fins. These zebrafish were acquired in a pet shop, and are stored in a 60 litres housing aquarium. The average total length of our zebrafish was \(\sim\)40 mm. The water temperature of the housing aquarium was 26 °C. The fish were fed twice a day using a food distributor with commercial food. The enrichment in the aquarium consisted of plastic plants, cladophoras, gravel, rocks and aquatic snails.

4.4 Experiment design

We tested 5 different modes for the beating tail of RiBot (Table 1) and three different linear constant speeds of the mobile robot: 0, 4 and 8 cm s\(^{-1}\). The modes were selected to test combinations of amplitudes and frequencies within the range of what is shown in Fig. 6. The linear speeds were selected based on the average linear speed of zebrafish, which is around 6 cm s\(^{-1}\) in this setup, so to measure the acceptance of the robot which has no speed, speed below the fish average speed and speed above the fish average speed. We have tested all different conditions with 8 trials randomly-instantiated of 1 min each. We used 5 zebrafish inside the circular corridor during the experiment that were picked randomly on the housing aquarium. The fish could thus move either clockwise (CW) or counter-clockwise (CCW) and RiBot was moving only CCW to determine if it could influence the fish to move inside the corridor with the same direction. After every 10 min of experiments, the group of five fish was replaced by another group of five zebrafish. We did not consider the visual aspect of RiBot in our experiment even if it is well known that it is an important factor in the attraction of zebrafish [18, 19]. This parameter will be tested in future experiments.

Table 1 The five different modes for the beating tail that were used during the experiments

5 Results and discussion

In our experiments, we have considered two types of measurements to characterise the acceptance of RiBot: The percentage of time that zebrafish are located at a distance below 5 cm from RiBot, and the swimming direction of the zebrafish inside the ring shape setup, which is either CW or CCW. The first measurement is a good indication of the acceptance of a robotic device by the group of fish [7, 13], compared to the distance between the fish and the robot position, as for the latter we usually obtained less significant effect as we shown in [13]. The second measurement offers a good indication of the influence of RiBot on the collective decision of the group of zebrafish.

Figure 9 shows the percentage of time spent by zebrafish in a 5 cm radius distance from RiBot when the latter was beating its tail, for the three different linear speeds of the robot. When the tail was not beating (frequency of 0 Hz), the presence of zebrafish near RiBot did not depend on the robot linear speed. The standard deviation in these conditions is also relatively small. However, when increasing the frequency of vibration of the tail, we can observe that the impact on the fish attraction started to depend on the robot linear speed. Indeed, when RiBot was static, its attractiveness increased significantly with the increase of vibration, compare to the case when RiBot was moving for which the increase of attraction is not significant. It could be postulated that when RiBot is moving, it also generates vibration underwater, and thus the change of vibration perceived by the zebrafish is not as significant as when RiBot is static. But for the latter, we can argue that the increase of tail beating frequency has a small impact on the attraction of the fish. The increase of attractiveness of an actuated robotic lure towards a group of fish was already mentioned in [9], in which it was demonstrated that fish were more attracted towards the robot when its tail was beating rather than when it was not. It can also be noticed that the standard deviation is increasing with the increase of beating frequency. This could be explained by the fact that this factor has an effect on certain group of fish, but this effect is not constant. Another explanation of this effect can be that the zebrafish may get bored after a certain period of time with the tail beating of RiBot and thus after a short period of attraction, their interest decreases.

Fig. 9
figure 9

Presence of zebrafish at a distance of 5 cm from the robotic system for the three different linear speeds. This was measured using the tracking software that retrieved for each video frame the position of RiBot and the zebrafish

Figure 10 shows the swimming direction of the zebrafish for every linear speed conditions of RiBot. The direction was determined using the position of the fish retrieved by the tracking software. The corridor was divided into four quadrants and when the fish majority passes from one quadrant to the other, depending on the direction, the fish shoal is counted as swimming CW or CCW. Without any device present inside water, we noticed that the group of zebrafish swam half of the time in one direction (CW) and half of the time in the other direction (CCW) so the setup had no bias. When RiBot was not moving (linear speed \(=\) 0 cm s\(^{-1}\)), the zebrafish swam mostly half of the time CW and half of the time CCW as for the case when no robotic devices were present. When RiBot was moving with a linear speed of 4 cm s\(^{-1}\) with a CCW direction, the zebrafish started to swim more in the CCW direction, and this effect increased when RiBot was moving with a linear speed of 8 cm s\(^{-1}\) with the zebrafish swimming CCW 70 % of the time with very low standard deviation. We ran an Anderson-darling test on the data to determine the normality of the data and assumed the homogeneity of the variances. We then ran an ANOVA test (Table 2) that rejected the hypothesis that the lure had no effect on the collective decision of the fish shoal (p value \(=\) 0.0141 \(<<\) 0.05). This result demonstrates that the robotic system composed of FishBot and RiBot is able to change the collective decision of the zebrafish shoal, i.e. the swimming direction, when its linear speed is varied. Further works will investigate more deeply the factors that could generate this effect, but this is a promising result using a prototyped version of RiBot.

Fig. 10
figure 10

Percentage of fish swimming in the same direction of RiBot when Ribot is moving with different linear speeds

Table 2 ANOVA table for the result obtained with the percentage of fish swimming with the same direction of RiBot shown on Fig. 10

6 Conclusion and future works

This paper introduced the design of a new robotic fish lure, RiBot, for fish–robot interaction studies. This device could also be used for different research areas such as bio-inspired robotics, biomimetics and animal behavior studies.

We showed that the first prototype of RiBot is able to beat its tail with amplitude up to 23\(^\circ\) and frequency up to 20 Hz. The device has an autonomy of 23 min when the actuator is continuously active during the experiment, but can reach more than 1 h if the actuated tail is only intermittently used. We also measured the speed of the lure when varying the tail beating frequency and amplitude and obtained a maximum linear speed of RiBot underwater of 2.5 cm s\(^{-1}\).

Behavioural experiments, conducted using RiBot coupled with a wheeled mobile robot indicated that the linear speed of RiBot can influence the collective choice of a shoal of zebrafish. The tail beating can also have an effect on the attraction of the fish toward the device, especially when RiBot is not moving. However, when the robot is moving, the effect of the linear speed seems much more significant than the effect of the beating tail. This is an important step to evaluate which stimuli can be attractive for zebrafish to create a mixed society of fish and robots.

Several improvements will be made in future work to decrease the size of RiBot, and several electronic components, such as LEDs and speakers will be added to generate more stimuli to evaluate the attractiveness of the device among zebrafish. Experiments involving a swarm of robotic agents will also be performed to study the interaction between a group of robots and a group of fish.