NESTLab / 2122_MultiDroneIndoorSLAM

Code for 21/22 MQP and DRs on Multi Drone Indoor SLAM
0 stars 0 forks source link

Creating Ros Packages #9

Closed tylerferrara closed 2 years ago

tylerferrara commented 2 years ago

This PR migrates both Communications and MapMerging python modules into the multi_map_ros node.

tylerferrara commented 2 years ago

Ros Compilation

# Copy package to catkin directory
$ cp -r 2122_MultiDroneIndoorSLAM/multi_map_ros ~/catkin_ws/src/

# Compile
$ cd ~/catkin_ws
$ catkin_make
Base path: /home/tyler/catkin_ws
Source space: /home/tyler/catkin_ws/src
Build space: /home/tyler/catkin_ws/build
Devel space: /home/tyler/catkin_ws/devel
Install space: /home/tyler/catkin_ws/install
Creating symlink "/home/tyler/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/noetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "make cmake_check_build_system" in "/home/tyler/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/tyler/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/tyler/catkin_ws/build/test_results
-- Forcing gtest/gmock from source, though one was otherwise available.
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") 
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - multi_map_ros
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'multi_map_ros'
-- ==> add_subdirectory(multi_map_ros)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- multi_map_ros: 1 messages, 1 services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tyler/catkin_ws/build
####
#### Running command: "make -j4 -l4" in "/home/tyler/catkin_ws/build"
####
[  0%] Built target std_msgs_generate_messages_nodejs
[  0%] Built target std_msgs_generate_messages_lisp
[  0%] Built target _multi_map_ros_generate_messages_check_deps_merge_srv
[  0%] Built target _multi_map_ros_generate_messages_check_deps_dag_node
[  0%] Built target std_msgs_generate_messages_cpp
[  0%] Built target std_msgs_generate_messages_eus
[  0%] Built target std_msgs_generate_messages_py
[  7%] Generating Javascript code from multi_map_ros/dag_node.msg
[ 23%] Generating C++ code from multi_map_ros/dag_node.msg
[ 23%] Generating Lisp code from multi_map_ros/dag_node.msg
[ 30%] Generating EusLisp code from multi_map_ros/dag_node.msg
[ 38%] Generating Javascript code from multi_map_ros/merge_srv.srv
[ 46%] Generating Lisp code from multi_map_ros/merge_srv.srv
[ 53%] Generating C++ code from multi_map_ros/merge_srv.srv
[ 61%] Generating EusLisp code from multi_map_ros/merge_srv.srv
[ 61%] Built target multi_map_ros_generate_messages_nodejs
[ 61%] Built target multi_map_ros_generate_messages_lisp
[ 69%] Generating Python from MSG multi_map_ros/dag_node
[ 76%] Generating Python code from SRV multi_map_ros/merge_srv
[ 84%] Built target multi_map_ros_generate_messages_eus
[ 84%] Built target multi_map_ros_generate_messages_cpp
[100%] Generating Python srv __init__.py for multi_map_ros
[100%] Generating Python msg __init__.py for multi_map_ros
[100%] Built target multi_map_ros_generate_messages_py
[100%] Built target multi_map_ros_generate_messages
tylerferrara commented 2 years ago

Passing Tests in coms Package

# Navigate to the coms package
$ cd 2122_MultiDroneIndoorSLAM/multi_map_ros/src/multi_map_ros/Communication

# Install the python module
$ python3 setup.py install

# Run all unit-tests
$ python3 -m unittest tests/*.py
......
----------------------------------------------------------------------
Ran 6 tests in 0.001s

OK
nikopoulospet commented 2 years ago

lgtm