Repository dedicated to the integration of the upper-level and the lower-level software.
Dedicated to the ROS 2 (joystick, control, perception)
Dedicated to low-level control (battery system, drive system, ligthing system...)
ros2 run joy joy_node
ros2 launch teleop_twist_joy teleop-launch.py joy_config:='xbox'
UDP, Serial, IO context
Following steps are necessary to set up rPI:
- Install Ubuntu
- Install necessary packages such as net-tools
- Add static IP adress
- Build ROS 2
- Build microROS
- Add bash script for autonomous start of the ROS 2 nodes on the startup
It is possible to connect on the rPI by attaching ethernet cable from PC to the crobot and use SSH.
Current IP of the crobot is: 192.168.1.5
And connection is possible with:
ssh [email protected]
password: crobot
Create static IP of the PC that's connected as: 192.168.1.x,
gateway is 192.168.1.1
Run following command to list all of the available networks:
nmcli device wifi list
Output is:
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
B6:99:7B:6F:1F:2A -- Infra 6 130 Mbit/s 100 ▂▄▆█ WPA2
1C:9E:CC:D1:09:98 TCHA90A5ZR Infra 11 405 Mbit/s 55 ▂▄__ WPA2 WPA3
00:CB:7A:A2:4E:88 TCH3P8S84A Infra 1 405 Mbit/s 49 ▂▄__ WPA2 WPA3
Choose one you need and connect to it with:
sudo nmcli device wifi connect <BSSID> password <PASSWORD>
In order to build microROS follow this instructions.
When building firmware, DO NOT source /opt/ros/$ROS_DISTRO/setup.bash
, DO source dev_ws/install/setup.bash
When building agent(with agent_ws), DO source /opt/ros/$ROS_DISTRO/setup.bash
, DO NOT source dev_ws/install/setup.bash
You'd better remove any setup like source /opt/ros/$ROS_DISTRO/setup.bash
in your ~/.bashrc
.
If output of the:
ros2 run micro_ros_setup create_agent_ws.sh
is:
[ros2run]: Process exited with failure 6
[ros2run]: Process exited with failure 6
device is not connected to the internet.
micro-ROS build duration:
firmware_build
: 30 minmicro_ros_agent
: 5 min
Add administrative privileges to the serial port as:
sudo chmod 777 /dev/ttyAMA0
UART --> GPIO 14/15 (/dev/ttyAMA0
)
More info
Running microROS over serial port
Command to start micro_ros_agent
over serial port is:
ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyAMA0
Github issue with micro_ros_agent cmd
Run micro_ros_agent
over serial as:
ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyAMA0 -b 115200
If the agent is running output is:
[1701472247.113546] info | TermiosAgentLinux.cpp | init | running... | fd: 3
[1701472247.114296] info | Root.cpp | set_verbose_level | logger setup | verbose_level
- In order to enable UART on the rPI it is important to add following lines to the
/boot/firmware/config.txt
:
# Enable UART
enable_uart=1
dtoverlay=pi3-miniuart-bt
- Also, copy and paste following to the
/boot/firmware/cmdline.txt
:
zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=zstd dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash
ros2 topic pub /cmd_vel geometry_msgs/msg/Twist "linear:
x: 4.5
y: 6.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0"
Current maintainer is [email protected]
Todo list for the initial HW-SW integration.
- Edit README.md (formatting)
- Enable WiFi connection for the development
- Build exemplary microROS on the rPI
- Check serial connection of the rPi and the Nucleo
- Setup serial communication for the microROS comms
- Create .rc scripts to start microROS after turning on
- Enable ros2_joy for the logitech joystick control
- Test initial funcitonality joy node
- Test initial functionality teleop_twist_joy node
- Enable upper-level control simple PID or pure-pursuit
- Think of the sensory placement for the autonomous control
- Define initial SW arch for the testing phases
- Write all necessary packages for the automatic deployment on the ROS 2
- Fix joy to cmd_vel mapping