A ROS1 differential drive robot with LiDAR. I built and programmed this robot from scratch with the aim of learning ROS!
The robot: DC motors with encoders, Raspberry pi 4, 2 Arduinos Nano, DIY LiDAR. |
---|
Map from SLAM performed by ddbot! Map isn't really clean, but still great considering the LiDAR is DIY. |
Check https://answers.ros.org/question/361930/rosserial-arduino-compilation-error-no-cstring/?answer=382803#post-id-382803 (Yash Sahu answer)
usbipd wsl list
usbipd wsl attach --busid 1-2
usbipd wsl detach --busid 1-2
And before using it:
sudo chmod 666 /dev/ttyUSB0
SSH : ssh ubuntu@ddrobot
Change hostname : https://www.pragmaticlinux.com/2021/05/how-to-change-the-hostname-of-your-raspberry-pi/
export ROS_MASTER_URI=http://ddbot:11311
Run $(rospack find ddbot_run)/scripts/find_usb_devices.py
And source $(rospack find ddbot_run)/scripts/set_usb_ports.bash
Adding this to .bashrc may be convenient :
test -f $(rospack find ddbot_run)/scripts/set_usb_ports.bash && source $(rospack find ddbot_run)/scripts/set_usb_ports.bash
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-1804-fr
And place commands to init ROS in a file ~/setup_ros.bash
instead of ~/.bashrc
roscore
roslaunch ddbot_gazebo simulation.launch
roslaunch ddbot_run robot_core_rviz.launch no_lidar:=true no_remote:=true sim:=true
roslaunch ddbot_teleop teleop_keyboard.launch