Get a ROS1 Navigation Stack up and running on your Magni!
Tested on a Magni running Ubuntu 16.04, ROS1 Kinetic ( Based on the Ubiquity Robotics image ).
We use a sick_tim571
as LiDAR sensor, but you can use whatever LiDAR setup you want;
You will have to modify the launch files accordingly.
You will also need to install udev
rules following here.
Assuming that you have ROS1 installation on your device, and sourced:
sudo apt update
sudo systemctl disable NetworkManager-wait-online.service
# Change auto eth0 to allow-hotplug eth0 in /etc/network/interfaces
sudo apt install python-catkin-tools python-vcstool python-rosdep avahi-daemon
source /opt/ros/kinetic/setup.bash
We will begin by installing all necessary dependencies.
cd $HOME/catkin_ws
rm -r build devel
git clone https://github.com/open-rmf/magni_nav_ros1 src/magni_nav_ros1
# Install dependencies
sudo apt install ros-kinetic-ros-base ros-kinetic-move-base ros-kinetic-dwa-local-planner ros-kinetic-amcl \
ros-kinetic-map-server ros-kinetic-tf2-web-republisher ros-kinetic-diagnostic-aggregator ros-kinetic-sick-tim \
ros-kinetic-sick-scan ros-kinetic-teleop-twist-keyboard
catkin build
On both your workstation and robot, set this in your ~/.bashrc
:
export ROS_HOSTNAME=`hostname`.local
This will use mdns for robot discovery, which is way more awesome than using ip addresses.
Your workstation will need the following as well in the ~/.bashrc
( replace ubiquityrobot with whatever your robot hostname is )
export ROS_MASTER_URI=http://ubiquityrobot.local:11311
Finally, we can launch a rviz visualization on your workstation
# Source your ROS1 distribution
rosrun rviz rviz
And open the file magni.rviz
here.
# You should be able to ping the robot from your workstation
ping ubiquityrobot.local
# ssh into the robot
ssh ubuntu@ubiquityrobot.local
# Check for deserialization errors
sudo systemctl status magni-base.service # If errors are present, restart this service: sudo systemctl restart magni-base.service
source /opt/ros/kinetic/setup.bash
source $HOME/catkin_ws/devel/setup.bash
roslaunch magni_nav_ros1 magni.launch
You should see Rviz update with the robot navigation map. Keyboard Telop is running on the robot as well, so you can drive the robot around using the ijlm keys. ( The navstack terminal must be in focus )
Replace the map files with your own navigation map. We have template files for cartographer_ros
in the cartographer_configs and launch files.
- Ubiquity Robotics for creating the Magni
- Morgan Quigley for the cartographer ros configurations
- CHART for development time and research