Avular Command Line Interface
The avular
command can be used to configure and interact with the Origin. The avular
command is only available on the native CreOS of the internal Linux computer, therefore also outside any Docker container.
Wi-Fi mode
The Origin can be configured to setup an access point, and to connect to a Wi-Fi network at the same time. The Wi-Fi adapter can be configured with the avular connectivity
command.
Access point
The Origin can be configured to enable an access point. The access point will allow you to directly connect to the Origin over Wi-Fi. By
default the access point will be named Origin <Serial>
, but this can be modified. When you connect to the access point, you can access the Origin at 192.168.192.1
. By default the access point will not have a password. We strongly recommend to set a password.
The access point can be enabled with the following command:
sudo avular connectivity enable_ap [-s "<SSID>"] [-p <PASSWORD>]
# Or alternatively if you just want to enable the access point without changing the SSID or password
sudo avular connectivity enable_ap
<SSID>
is to replaced by the desired network name.- If the network name contains a
[space]
character, in the command line the[space]
is to be replaced by\[space]
. For example if the desired<SSID>
isOrigin Network
than the prompt must be:sudo avular connectivity enable_ap -s "Origin\ Network" -p <PASSWORD>
- If the network name contains a
<PASSWORD>
is to be replaced by a password with at least 8 characters.
You can disable the access point with the following command:
sudo wifi_ap disable
Wi-Fi network
The Origin can be configured to connect to a Wi-Fi network. The Wi-Fi network can be configured with the avular connectivity
command.
By default the Origin does not know any Wi-Fi networks. You can add a Wi-Fi network using the standard Linux Network Manager tool nmtui
or by using the avular connectivity
command.
To add a Wi-Fi network, you can use the following command:
sudo avular connectivity enable_client_mode -s <SSID> [-p <PASSWORD>]
<SSID>
is to replaced by the desired network name.- If the network name contains a
[space]
character, in the command line the[space]
is to be replaced by\[space]
. For example if the desired<SSID>
isOrigin Network
than the prompt must be:sudo avular connectivity enable_client_mode -s "Origin\ Network" -p <PASSWORD>
- If the network name contains a
<PASSWORD>
is to be replaced by a password with at least 8 characters.
To disconnect from the Wi-Fi network, you can use the following command:
sudo wifi_client_mode disable
Changing Linux user password
The internal Linux computer uses avular
as the username. The accompanied default password is also avular
. It is recommended to change the default password after logging in for the first time. This can be done with the following command:
passwd avular
Setting the Avular mode
The Avular mode can be set with the avular mode
command. The Avular mode can be either production
or development
. The production
mode is the default mode, and should be used when the robot is used in a production environment. The development
mode simply stops the pioneers-prod
docker-compose application, and starts the pioneers-dev
docker-compose application. The only difference between the pioneers-prod
and pioneers-dev
docker-compose applications is that the pioneers-dev
application does not start its ROS 2 nodes automatically. This allows you to start the ROS 2 nodes manually, which might useful for debugging purposes.
The avular mode
command can be used to get the current mode:
avular mode get
and to set a new mode:
avular mode set <new_mode>
<new_mode>
can be either production
/ p
or development
/ d
.
After changing the mode, the containers will not be restarted automatically. To restart the containers, you can use the avular compose
command.
Interacting with the docker-compose applications
The avular compose
command can be used to interact with the docker-compose applications.
The avular compose
command can be used to start and stop the containers, as follows:
avular compose start
avular compose stop
These commands can be used to restart all the containers, which will also restart all the ROS 2 nodes.
The avular compose
command can also be used to remove and create the containers, as follows:
avular compose down
avular compose up
Running these commands does not only restart the containers, but also removes and creates them. This means that the containers will be created from scratch. This is useful when you want to make sure that the containers are running in a clean state.
The avular compose
command can also be used to show the status of the containers, as follows:
avular compose show
This is similiar to the docker ps
command, but instead it only shows containers which are impacted by the avular compose commands.
The avular compose
command can also be used to enter a running container, as follows:
avular compose enter <container_name>
docker exec -it <container_name> bash
, but it also sets the SSH_AUTH_SOCK
environment variable. This allows you to access your private repositories from within the container, using the SSH agent that you used when connecting to the Origin using the -A
flag in the SSH connection command.
The avular compose
command can also be used to show the logs of all the containers, as follows:
avular compose logs
docker logs -f <container_name>
, but instead it shows the logs of all the containers.