@@ -68,10 +68,12 @@ source /opt/ros/galactic/setup.bash
6868sudo apt install -y \
6969network-manager \
7070daemontools \
71- ros-galactic-robot-upstart \
7271chrony \
72+ socat \
73+ ros-galactic-robot-upstart \
7374ros-galactic-turtlebot4-robot \
74- ros-galactic-irobot-create-control
75+ ros-galactic-irobot-create-control \
76+ ros-galactic-rmw-fastrtps-cpp
7577
7678# Copy udev rules
7779sudo cp $SETUP_DIR /udev/turtlebot4.rules /etc/udev/rules.d/
@@ -82,20 +84,29 @@ sudo cp $SETUP_DIR/conf/chrony.conf /etc/chrony/
8284# Restart chrony
8385sudo service chrony restart
8486
87+ # Copy webserver service
88+ sudo cp $SETUP_DIR /conf/webserver.service /etc/systemd/system/
89+
90+ # Enable webserver service to run from boot
91+ sudo systemctl enable webserver.service
92+
8593# Enable usb0
8694echo " dtoverlay=dwc2,dr_mode=peripheral" | sudo tee -a /boot/firmware/usercfg.txt
8795sudo sed -i ' ${s/$/ modules-load=dwc2,g_ether/}' /boot/firmware/cmdline.txt
8896
8997# Enable i2c-3
9098echo " dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=4,i2c_gpio_scl=5" | sudo tee -a /boot/firmware/usercfg.txt
9199
100+ # Source galactic setup in bashrc
101+ echo " source /opt/ros/galactic/setup.bash" | sudo tee -a ~ /.bashrc
102+
92103# Configure cyclonedds
93104sudo cp $SETUP_DIR /conf/cyclonedds_rpi.xml /etc/
94105echo " export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" | sudo tee -a ~ /.bashrc
95106echo " export CYCLONEDDS_URI=/etc/cyclonedds_rpi.xml" | sudo tee -a ~ /.bashrc
96107
97- # Source galactic setup in bashrc
98- echo " source /opt/ros/galactic/setup.bash " | sudo tee -a ~ /.bashrc
108+ # Set ROS_DOMAIN_ID
109+ echo " export ROS_DOMAIN_ID=0 " | sudo tee -a ~ /.bashrc
99110
100111# Robot upstart
101112$SCRIPT_DIR /install.py $model
@@ -106,6 +117,7 @@ sudo systemctl daemon-reload
106117sudo cp $SCRIPT_DIR /wifi.sh \
107118 $SCRIPT_DIR /create_update_0.4.0.sh \
108119 $SCRIPT_DIR /create_update.sh \
120+ $SCRIPT_DIR /ros_config.sh \
109121 $SCRIPT_DIR /swap_on.sh \
110122 $SCRIPT_DIR /swap_off.sh \
111123 $SCRIPT_DIR /bluetooth.sh \
@@ -114,7 +126,7 @@ sudo cp $SCRIPT_DIR/wifi.sh \
114126
115127# Set image information
116128sudo touch /etc/turtlebot4
117- echo " TurtleBot 4 $model v0.1.2 " | sudo tee /etc/turtlebot4
129+ echo " TurtleBot 4 $model v0.1.3 " | sudo tee /etc/turtlebot4
118130
119131echo " Installation complete, press enter to reboot in AP mode."
120132
0 commit comments