diff --git a/.travis.yml b/.travis.yml index d785a90..87cf5a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ notifications: env: global: - UPSTREAM_WORKSPACE=file - - ROSINSTALL_FILENAME=opp.rosinstall + - ROSINSTALL_FILENAME=dependencies.rosinstall - ROS_REPO=ros - CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug" - ROSDEP_SKIP_KEYS="libqt5sql5-mysql" diff --git a/README.md b/README.md index b5350a8..47c4295 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ROS packages for generating offline toolpaths from CAD. Built to run on Ubuntu 2) Pretty pictures ## Install instructions -1) Clone the repo into your workspace. Then from the workspace root run `wstool init src opp.rosinstall` +1) Clone the repo into your workspace. Then from the workspace root run `wstool init src dependencies.rosinstall` 2) Run rosdep from the root of your workspace to pull dependencies `rosdep install --from-paths src --ignore-src -r -y` diff --git a/dependencies.rosinstall b/dependencies.rosinstall new file mode 100644 index 0000000..580e6a4 --- /dev/null +++ b/dependencies.rosinstall @@ -0,0 +1,12 @@ + +# Noether +- git: + local-name: noether + uri: 'https://github.com/ros-industrial/noether.git' + version: 3765895f451cbff8eefb5ec1e5a2387042ab65a4 + +# RViz Tool Cursor +- git: + local-name: rviz_tool_cursor + uri: 'https://github.com/marip8/rviz_tool_cursor.git' + version: 0.1.0 diff --git a/opp.rosinstall b/opp.rosinstall deleted file mode 100644 index 975a54c..0000000 --- a/opp.rosinstall +++ /dev/null @@ -1,7 +0,0 @@ -# ROS-Install File - -# Noether -- git: {local-name: noether, uri: 'https://github.com/ros-industrial/noether.git', version: master} - -# RViz Tool Cursor -- git: {local-name: rviz_tool_cursor, uri: 'https://github.com/marip8/rviz_tool_cursor.git', version: master} diff --git a/opp_gui/src/widgets/tool_path_planner_widget.cpp b/opp_gui/src/widgets/tool_path_planner_widget.cpp index 2233ffa..d48d361 100644 --- a/opp_gui/src/widgets/tool_path_planner_widget.cpp +++ b/opp_gui/src/widgets/tool_path_planner_widget.cpp @@ -36,6 +36,8 @@ #include "ui_tool_path_planner.h" const static std::string MESH_MARKER_TOPIC = "mesh_marker"; +const static int MIN_TOUCH_POINTS = 0; +const static int MIN_VERIFICATION_POINTS = 0; namespace opp_gui { @@ -303,10 +305,13 @@ void ToolPathPlannerWidget::saveModel() using TouchPointMap = std::map; TouchPointMap touch_points = touch_point_editor_->getPoints(); TouchPointMap verification_points = verification_point_editor_->getPoints(); - if (touch_points.size() < 3 || verification_points.size() < 3) + if (touch_points.size() < MIN_TOUCH_POINTS || verification_points.size() < MIN_VERIFICATION_POINTS) { - QMessageBox::warning( - this, "Invalid Model Definition", "Ensure at least 3 touch points and 3 verification points have been defined"); + QMessageBox::warning(this, + "Invalid Model Definition", + ("Ensure at least " + std::to_string(MIN_TOUCH_POINTS) + " touch points and " + + std::to_string(MIN_VERIFICATION_POINTS) + " verification points have been defined") + .c_str()); return; }