This package contains everything needed to run the lab's Infrastructure Inspection Robot
cloning this package, then doing colcon build then ros2 launch iir_base diffbot.launch.py will launch RSP, and ros2control among other things. There is also a sim package iir_sim and a nav package iir_nav which have launch files iir_sim.launch.py and navigation.launch.py
Refer to the READMEs inside the individual package folders for more information.
If this is your first time using this repository on a new machine and you plan on using micro-ros to communicate with the Teensy (which is how we obtain the IMU data for use with the EKF), you will need to setup micro-ros. Follow these steps to add micro-ros to the repository.
cd iir-ws/src
git clone -b jazzy https://github.com/micro-ROS/micro_ros_setup.git src/micro_ros_setup
# Update dependencies using rosdep
sudo apt update && rosdep update
rosdep install --from-paths src --ignore-src -y
# Install pip
sudo apt-get install python3-pip
Go back up to iir-ws
colcon build
source install/local_setup.bash
ros2 run micro_ros_setup create_agent_ws.sh
# Build step
ros2 run micro_ros_setup build_agent.sh
The build step will take a minute to compile. Once this completes you should be able to run
ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0
And see some IMU topics. This assumes wiring and the teensy/imus are setup properly already. If you are still having issues, refer to Micro-ROS / IMU / Teensy Guide in the Google Drive.
Note: Run each of these commands one at a time. You do not need ROS2 installed to follow this, you simply need a terminal with SSH capabilites.
- Plug riplab router in
- connect laptop to riplab network
- turn robot on The PI will automatically connect to the riplab network
ssh riplab@192.168.1.22
Then run these commands to configure the pi (must be done every time robot is reset). Run these commands one at a time.
$ sudo ip link set can0 down
$ sudo ip link set can0 type can bitrate 1000000
$ sudo ip link set can0 up
$ cd iir-ws
$ source install/local_setup.bash
$ ./start_script
This will open 2 windows, the 1st is the base control system, the second is the micro-ros node.
To start the teleop controller, hit CTRL-B and then % to open a new tmux window. In the new window, run this command:
$ ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r cmd_vel:=diff_drive_controller/cmd_vel -p stamped:=true
this final command will open up a window that will allow you to drive the robot around. You may also run this command on your local machine.
Controls:
q/z will increase/decrease the speed of the motors
i /,will drive forward/backward
j/l will turn left/right
k will stop the robot
CTRL-C any of the tmux windows, then run
pkill tmux
This will force quit all tmux windows.
Then redo the ./start_script , open a new tmux pane, and rerun the teleop twist command.
Check http://router.asus.com/Main_Login.asp
user: admin
pw: you know this one
Click on clients to see all devices connected. If the PI is not showing up here then you should try shutting down and rebooting the PI. We have seen issues where the PI SD card will not boot up. In this case, refer to phase 3 of this document: Raspberry Pi Ubuntu SD Card Backup, which can be found at RIPLAB>UXS>InfrastructureInspection