Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the requirement for 3 touch points #16

Merged
merged 4 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
12 changes: 12 additions & 0 deletions dependencies.rosinstall
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions opp.rosinstall

This file was deleted.

11 changes: 8 additions & 3 deletions opp_gui/src/widgets/tool_path_planner_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -303,10 +305,13 @@ void ToolPathPlannerWidget::saveModel()
using TouchPointMap = std::map<std::string, opp_msgs::TouchPoint>;
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;
}

Expand Down