Search
The main task is to implement ROS modules for asymptotically optimal randomized sampling-based path planning using the OMPL library.
Implement ROS nodes to solve the asymptotically optimal randomized sampling-based path planning. The provided resource pack supports deployment using the STDR simulator. Moreover, an R-VIZ setup file is provided to visualize the robot knowledge of the environment using the messages published by the individual ROS nodes.
The simulator provides and processes the following inputs and outputs, respectively
To run the STDR simulator
roslaunch uir_ompl_tools uir_backend_stdr.launch
The provided RVIZ setup file may be used to visualize the following topics
Moreover, an interactive marker is setup in RVIZ to place the robot goal on the map.
A demonstration in STDR is evaluated by an instructor during the labs.
The path following module drives the robot along a given path by publishing velocity commands.
The path planning module plans a safe path to the published goal.
The path should be computed using a single-query asymptotically optimal randomized sampling-based planner. This may be achieved using the OMPL library with a variant of the RRT* planner. The Rapid library may used to check for collision in a similar manner to the tasks T3a-sampl and T3b-rrt.
To run the ROS nodes, it is strongly recommended to use either Ubuntu 16 with ROS Kinetic or Ubuntu 18 with ROS Melodic. Detailed installation instructions may be found on ROS web pages ROS Kinetic, ROS Melodic.
On the lab computers, ROS Kinetic is already preinstalled but two more libraries need to be installed before using it.
pip install rospkg pip install netifaces
~/.bashrc
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
Finally, on Ubuntu 16 the STDR simulator is installed using
sudo apt-get install ros-kinetic-stdr-*
The Open Motion Planning Library (OMPL) implements many state-of-the-art sampling-based motion planning algorithms. The OMPL library may be downloaded at this link. To install OMPL and generate its Python bindings, cd into the downloaded folder and run
sudo -s ./install-ompl-ubuntu.sh --python
# the default version of Python in 17.10 and above is version 3 if [[ $ubuntu_version > 1704 ]]; then PYTHONV=3 fi
# the default version of Python in 17.10 and above is version 3 if [[ $ubuntu_version > 1704 ]]; then PYTHONV=2 fi
Alternatively, it is possible to get OMPL working on Ubuntu 16.04 by installing using the minimum install script. The script copies the necessary libraries into the /usr/local/lib directory and bindings to the /usr/local/lib/python2.7.
/usr/local/lib
/usr/local/lib/python2.7
On Ubuntu 16 and 18 the ROS workspace is created as follows
cd ~/ mkdir rds_ws mkdir rds_ws/src cd rds_ws catkin_make # source the workspace cd devel devel_path=$(pwd) echo "source $devel_path/setup.bash" >> ~/.bashrc source setup.bash # Add new (custom) package to the workspace cd ~/rds_ws/src # Go to src folder in your workspace. ln -s [path to your package] # Create symlink to your package (or place the whole package directly to src). cd ~/rds_ws catkin_make # Compile the workspace. rospack list # Make sure that your pack is known. (Sometimes this is necessary to refresh ROS. ) # Now, you should be able to use the package within ROS (rosrun or roslaunch). # useful commands rostopic list # all current topics in the ROS system rostopic info [topic name] # show info about topic - publishers, subscribers rostopic echo [topic name] # writes msgs data on certain topic to stdout rostopic hz [topic name] # prints frequency of msgs on a certain topic rosnode list # all currently running nodes rosnode info [node name] # info about the node: published topics, subscribed topics # useful tools rqt_graph # visualize connection between the nodes (might not be 100% accurate) rviz # spatial visualization of the msgs rosrun tf view_frames # creates pdf with a visualization of the whole transformation tree (all the /tf msgs in the system) rosbag record # capture ROS msgs on selected topics (data can be played with selected speed afterwards) rosbag play [bagfile] # play data saved in bagfile
The main study material for ROS is http://wiki.ros.org/ROS/Tutorials. A special attention should be given to ROS message-based communication presented in http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28python%29.