[ROS] MIR100 ROS Driver
Install
First of all, you should install package below.
# create a catkin workspace
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src/
# clone mir_robot into the catkin workspace
git clone -b noetic https://github.com/dfki-ric/mir_robot.git
# use rosdep to install all dependencies (including ROS itself)
sudo apt-get update -qq
sudo apt-get install -qq -y python-rosdep
sudo rosdep init
rosdep update
rosdep install --from-paths ./ -i -y --rosdistro noetic
# build all packages in the catkin workspace
source /opt/ros/noetic/setup.bash
catkin_init_workspace
cd ~/catkin_ws
catkin_make -DCMAKE_BUILD_TYPE=RelWithDebugInfo
Interface
It is important to know the communication interface of the ros driver.
When the MIR is turn on, the ROS Master of MIR run too.
So in this ROS Driver for MIR, you use "ros bridge" to connect two nodes which have different ROS Master.
In this Package you can run it with following command.
roslaunch mir_driver mir.launch
after that you can do Mapping or Navigation with it.
Mapping
The mapping algorithm of the ros driver is Bad and Inaccurate.
It is better to use Web-based Mapping.
But the command is followed like below.
# the Wireless communication should be connected between MIR and External PC
# chooose wifi of MIR router from External PC
# password is "mirex4you"
# terminal_1, ROS Master
roscore
# terminal_2, MIR Driver
roslaunch mir_driver mir.launch
# terminal_3, Mapping
roslaunch mir_navigation hector_mapping.launch
# terminal_4, Rviz
rviz -d $(rospack find mir_navigation)/rviz/navigation.rviz
# terminal_5, Save the Map
cd $(rospack find mir_navigation)
mkdir maps
cd map
rosrun map_server map_saver -f name_of_the_map
and If you made map from Web-based, You can just save the map with commands below.
then the activated map in Web would be saved.
# the Wireless communication should be connected between MIR and External PC
# chooose wifi of MIR router from External PC
# password is "mirex4you"
# terminal_1, Save the Map
cd $(rospack find mir_navigation)
mkdir maps
cd maps
rosrun map_server map_saver -f name_of_the_map
Navigation
Type following commands
# the Wireless communication should be connected between MIR and External PC
# chooose wifi of MIR router from External PC
# password is "mirex4you"
# terminal_1, Save the Map
cd $(rospack find mir_navigation)
mkdir maps
cd maps
rosrun map_server map_saver -f name_of_the_map
I'm not gonna describe about how to navigate the robot.
there are bunch of example, so just google it.
!!! I've Found that out, another way to do navigation !!!
When the MIR100 Run, The Navigation Nodes started Autonomously,
so, what you need to do is open the RViz, and do Navigation right away.
# the Wireless communication should be connected between MIR and External PC
# chooose wifi of MIR router from External PC
# password is "mirex4you"
# terminal_1, ROS Master
roscore
# terminal_2, MIR Driver
roslaunch mir_driver mir.launch
# terminal_3, Rviz
rviz -d $(rospack find mir_navigation)/rviz/navigation.rviz
Thanks.