Skip to content

Commit

Permalink
Merge pull request #81 from PickNikRobotics/remove-trailing-whitespace
Browse files Browse the repository at this point in the history
remove trailing whitespace
  • Loading branch information
aaronplusone authored Apr 30, 2019
2 parents dc9a95a + 327b603 commit b85326b
Show file tree
Hide file tree
Showing 17 changed files with 88 additions and 88 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sudo: required
dist: trusty
language: generic
sudo: required
dist: trusty
language: generic
compiler:
- gcc
notifications:
Expand All @@ -13,5 +13,5 @@ env:
- ROS_DISTRO="kinetic" UPSTREAM_WORKSPACE=file ROSINSTALL_FILENAME=.travis.rosinstall
install:
- git clone https://github.com/ros-industrial/industrial_ci.git .ci_config
script:
script:
- source .ci_config/travis.sh
2 changes: 1 addition & 1 deletion moveit_simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ include_directories(
${EIGEN3_INCLUDE_DIRS}
)

add_library(${PROJECT_NAME}
add_library(${PROJECT_NAME}
src/joint_lock_options.cpp
src/joint_locker.cpp
src/online_robot.cpp
Expand Down
10 changes: 5 additions & 5 deletions moveit_simple/include/moveit_simple/exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ class ExecutionFailureException : public std::runtime_error
class IKFailException : public std::runtime_error
{
public:
IKFailException(const std::string errorDescription)
IKFailException(const std::string errorDescription)
: std::runtime_error(errorDescription) { }
};

/**
* @brief IKSolverTransformException:
* @brief IKSolverTransformException:
*
* This inherits from std::runtime_error.
* This is an exception class to be thrown when a custom iksolver is
Expand All @@ -78,12 +78,12 @@ class IKSolverTransformException : public std::runtime_error
class CollisionDetected : public std::runtime_error
{
public:
CollisionDetected(const std::string errorDescription)
CollisionDetected(const std::string errorDescription)
: std::runtime_error(errorDescription) { }
};

/**
* @brief JointSeedException:
* @brief JointSeedException:
*
* This inherits from std::runtime_error.
* This is an exception class to be thrown when a pre-defined joint
Expand All @@ -93,7 +93,7 @@ class CollisionDetected : public std::runtime_error
class JointSeedException : public std::runtime_error
{
public:
JointSeedException(const std::string error_description)
JointSeedException(const std::string error_description)
: std::runtime_error(error_description) { }
};
} // namespace moveit_simple
Expand Down
4 changes: 2 additions & 2 deletions moveit_simple/include/moveit_simple/online_robot.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class OnlineRobot : public Robot
public:
/**
* @brief Constructor
*/
*/
OnlineRobot(const ros::NodeHandle &nh, const std::string &robot_description,
const std::string &group_name);

Expand All @@ -51,7 +51,7 @@ class OnlineRobot : public Robot
* some tcp frame.
*/
OnlineRobot(const ros::NodeHandle &nh, const std::string &robot_description,
const std::string &group_name, const std::string &ik_base_frame,
const std::string &group_name, const std::string &ik_base_frame,
const std::string &ik_tip_frame);

/**
Expand Down
8 changes: 4 additions & 4 deletions moveit_simple/include/moveit_simple/point_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef std::vector<TrajectoryPointInfo> TrajectoryInfo;

class TrajectoryPoint
{
public:
public:
friend class Robot;

virtual ~TrajectoryPoint() { }
Expand Down Expand Up @@ -112,7 +112,7 @@ class JointTrajectoryPoint : public TrajectoryPoint
public:
friend class CombinedTrajectoryPoint;
JointTrajectoryPoint() : TrajectoryPoint("", 0.0, PointType::JOINT) { }

virtual ~JointTrajectoryPoint() { }

JointTrajectoryPoint(std::vector<double> &joint_point, double t, std::string name = std::string(),
Expand Down Expand Up @@ -196,7 +196,7 @@ class CombinedTrajectoryPoint : public TrajectoryPoint
{
return pose_;
}

const std::vector<double> &jointPoint() const
{
return joint_point_;
Expand All @@ -210,7 +210,7 @@ class CombinedTrajectoryPoint : public TrajectoryPoint
std::string pointVecToString(const std::vector<double> &vec) const;

protected:

virtual std::unique_ptr<JointTrajectoryPoint>
toJointTrajPoint(const Robot &robot, double timeout, const std::vector<double> &seed,
JointLockOptions options = JointLockOptions::LOCK_NONE) const;
Expand Down
2 changes: 1 addition & 1 deletion moveit_simple/include/moveit_simple/prettyprint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace pretty_print
struct delimiters
{
using type = delimiters_values<TChar>;
static const type values;
static const type values;
};


Expand Down
18 changes: 9 additions & 9 deletions moveit_simple/include/moveit_simple/robot.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Robot
public:
/**
* @brief Constructor
*/
*/
Robot(const ros::NodeHandle &nh, const std::string &robot_description,
const std::string &group_name);

Expand Down Expand Up @@ -92,7 +92,7 @@ class Robot
* @param timeout - (optional) timeout for IK
* @return
*/
bool isInCollision(const Eigen::Affine3d &pose,
bool isInCollision(const Eigen::Affine3d &pose,
const geometry_msgs::TransformStamped &frame_to_robot_base,
const std::string &joint_seed, double timeout = 10.0) const;

Expand Down Expand Up @@ -141,7 +141,7 @@ class Robot
* @param joint_seed (optional) - seed to use
* @return
*/
bool isInCollision(const Eigen::Affine3d &pose,
bool isInCollision(const Eigen::Affine3d &pose,
const geometry_msgs::TransformStamped &frame_to_robot_base,
double timeout = 10.0, std::vector<double> joint_seed = std::vector<double>()) const;

Expand Down Expand Up @@ -174,7 +174,7 @@ class Robot
* @param joint_seed - seed to use
* @return
*/
bool isReachable(const Eigen::Affine3d &pose,
bool isReachable(const Eigen::Affine3d &pose,
const geometry_msgs::TransformStamped &frame_to_robot_base,
const std::string &joint_seed, double timeout = 10.0) const;

Expand Down Expand Up @@ -212,7 +212,7 @@ class Robot
* @param joint_seed (optional) - named seed to use defined in srdf
* @return
*/
bool isReachable(const Eigen::Affine3d &pose,
bool isReachable(const Eigen::Affine3d &pose,
const geometry_msgs::TransformStamped &frame_to_robot_base,
double timeout = 10.0, std::vector<double> joint_seed = std::vector<double>()) const;

Expand Down Expand Up @@ -439,11 +439,11 @@ class Robot
void updateRvizRobotState(const Eigen::Affine3d &pose, const std::string &in_frame,
std::vector<double> joint_seed = std::vector<double>(), double timeout = 10.0) const;

void updateRvizRobotState(const Eigen::Affine3d &pose,
void updateRvizRobotState(const Eigen::Affine3d &pose,
const geometry_msgs::TransformStamped &frame_to_robot_base,
const std::string &joint_seed, double timeout = 10.0) const;

void updateRvizRobotState(const Eigen::Affine3d &pose,
void updateRvizRobotState(const Eigen::Affine3d &pose,
const geometry_msgs::TransformStamped &frame_to_robot_base,
std::vector<double> joint_seed = std::vector<double>(),
double timeout = 10.0) const;
Expand All @@ -460,7 +460,7 @@ class Robot

Eigen::Affine3d transformToBase(const Eigen::Affine3d &in, const std::string &in_frame) const;

Eigen::Affine3d transformToBase(const Eigen::Affine3d &in,
Eigen::Affine3d transformToBase(const Eigen::Affine3d &in,
const geometry_msgs::TransformStamped &transform_msg) const;

/**
Expand Down Expand Up @@ -522,7 +522,7 @@ class Robot
* @param t: parameteric time
* @param point: interpolated Cartesian point
*/
void interpolate(const std::unique_ptr<CartTrajectoryPoint> &from,
void interpolate(const std::unique_ptr<CartTrajectoryPoint> &from,
const std::unique_ptr<CartTrajectoryPoint> &to, double t,
std::unique_ptr<CartTrajectoryPoint> &point) const;

Expand Down
6 changes: 3 additions & 3 deletions moveit_simple/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<name>moveit_simple</name>
<version>0.1.0</version>
<description>Includes simple wrappers for calling MoveIt as a ROS based library. Similar function as MoveGroup but all calls are made locally using direct MoveIt objects. This library assumes that MoveIt is being used in a broader ROS system (i.e. certain parameters, like robot_description exist)</description>
<license>Apache 2.0</license> <!-- moveit_simple -->

<license>Apache 2.0</license> <!-- moveit_simple -->
<license>Boost Software License</license> <!-- prettyprint -->

<maintainer email="[email protected]">Shaun Edwards</maintainer>
<author>Shaun Edwards</author>

Expand Down
4 changes: 2 additions & 2 deletions moveit_simple/src/online_robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace moveit_simple
{
OnlineRobot::OnlineRobot(const ros::NodeHandle &nh, const std::string &robot_description,
const std::string &group_name) : Robot(nh, robot_description, group_name),
const std::string &group_name) : Robot(nh, robot_description, group_name),
action_("joint_trajectory_action", true)
{
current_robot_state_.reset(new moveit::core::RobotState(robot_model_ptr_));
Expand Down Expand Up @@ -139,7 +139,7 @@ void OnlineRobot::execute(std::vector<moveit_simple::JointTrajectoryPoint> &join
}
else
{
ROS_ERROR_STREAM("Collision detected at " << collision_points
ROS_ERROR_STREAM("Collision detected at " << collision_points
<< " points for Joint Trajectory");
throw CollisionDetected("Collision detected while interpolating ");
}
Expand Down
36 changes: 18 additions & 18 deletions moveit_simple/test/kuka_kr210.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class UserRobotTest : public ::testing::Test
protected:
std::unique_ptr<moveit_simple::OnlineRobot> robot;
virtual void SetUp()
{
{
robot = std::unique_ptr<moveit_simple::OnlineRobot> (new moveit_simple::OnlineRobot
(ros::NodeHandle(), "robot_description", "manipulator"));
ros::Duration(2.0).sleep(); //wait for tf tree to populate
Expand All @@ -62,7 +62,7 @@ class DeveloperRobot: public moveit_simple::OnlineRobot
using moveit_simple::OnlineRobot::cartesianInterpolation;
using moveit_simple::OnlineRobot::isInCollision;
};

/**
* @brief DeveloperRobotTest is a fixture for testing protected methods.
* Objects that can be directly used inside the test
Expand All @@ -74,7 +74,7 @@ class DeveloperRobotTest : public ::testing::Test
protected:
std::unique_ptr<DeveloperRobot> robot2;
virtual void SetUp()
{
{
robot2 = std::unique_ptr<DeveloperRobot> (new DeveloperRobot
(ros::NodeHandle(), "robot_description", "manipulator"));
ros::Duration(2.0).sleep(); //wait for tf tree to populate
Expand All @@ -87,7 +87,7 @@ class DeveloperRobotTest : public ::testing::Test

TEST(MoveitSimpleTest, construction_robot)
{
moveit_simple::Robot robot(ros::NodeHandle(), "robot_description", "manipulator");
moveit_simple::Robot robot(ros::NodeHandle(), "robot_description", "manipulator");
}


Expand All @@ -100,7 +100,7 @@ TEST(MoveitSimpleTest, construction_online_robot)
TEST(MoveitSimpleTest, reachability)
{
moveit_simple::Robot robot(ros::NodeHandle(), "robot_description", "manipulator");
const Eigen::Affine3d pose = Eigen::Affine3d::Identity();
const Eigen::Affine3d pose = Eigen::Affine3d::Identity();
ros::Duration(2.0).sleep(); //wait for tf tree to populate

ROS_INFO_STREAM("Testing reachability of unknown point, should fail");
Expand All @@ -122,7 +122,7 @@ TEST(MoveitSimpleTest, reachability)
TEST_F(UserRobotTest, add_trajectory)
{
const std::string TRAJECTORY_NAME("traj1");
const Eigen::Affine3d pose = Eigen::Affine3d::Identity();
const Eigen::Affine3d pose = Eigen::Affine3d::Identity();
const moveit_simple::InterpolationType cart = moveit_simple::interpolation_type::CARTESIAN;
const moveit_simple::InterpolationType joint = moveit_simple::interpolation_type::JOINT;

Expand All @@ -131,13 +131,13 @@ TEST_F(UserRobotTest, add_trajectory)
EXPECT_THROW(robot->addTrajPoint(TRAJECTORY_NAME, pose, "random_link", 5.0), tf2::TransformException);
ROS_INFO_STREAM("Testing trajectory adding of points");
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "home", 0.5));

EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "waypoint1", 1.0, joint, 5));
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "tf_pub1", 2.0, cart, 8));
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "waypoint2", 3.0));
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "waypoint3", 4.0, joint));
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, pose, "tool0", 5.0));

EXPECT_NO_THROW(robot->execute(TRAJECTORY_NAME));

EXPECT_NO_THROW(robot->addTrajPoint("traj2", "waypoint4", 4.5));
Expand Down Expand Up @@ -176,7 +176,7 @@ TEST_F(DeveloperRobotTest, planning)

EXPECT_TRUE(robot2->getJointSolution(cart_interpolated_expected_pose, 3.0, seed, cart_interpolated_expected_joint));

// joint_point1,joint_point4, cart_point1 and cart_point3
// joint_point1,joint_point4, cart_point1 and cart_point3
// represent the same pose
// joint_point2, cart_point2 and joint_point3 represent the same pose
std::unique_ptr<moveit_simple::TrajectoryPoint> joint_point1 =
Expand Down Expand Up @@ -432,19 +432,19 @@ TEST_F(UserRobotTest, speed_reconfiguration)
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "tf_pub1", 2.0));
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "waypoint2", 3.0));
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "waypoint3", 4.0));

// Test 1 -- Max_Execution_Speed: Plan & then Execute that Plan separately
robot->setSpeedModifier(1.0);
EXPECT_TRUE(robot->getSpeedModifier() == 1.0);

std::vector<moveit_simple::JointTrajectoryPoint> goal;

EXPECT_NO_THROW(goal = robot->plan(TRAJECTORY_NAME));
EXPECT_NO_THROW(robot->execute(goal));
EXPECT_NO_THROW(robot->execute(goal));

execution_time_check_1 = goal[goal.size()-1].time();
EXPECT_TRUE(execution_time_check_1 >= 0.0);
ROS_INFO_STREAM("Time for single traj. execution at MAX speed: "
ROS_INFO_STREAM("Time for single traj. execution at MAX speed: "
<< execution_time_check_1 << " seconds");

// Test 2 -- Half_Execution_Speed: Plan & Execute
Expand Down Expand Up @@ -482,12 +482,12 @@ TEST_F(UserRobotTest, speed_reconfiguration)
delta_time_for_speed_limits = delta_max_half_speeds - delta_half_min_speeds;
EXPECT_NEAR(delta_time_for_speed_limits, 0.0, execution_time_tolerance);

if(abs(delta_time_for_speed_limits) > execution_time_tolerance)
if(abs(delta_time_for_speed_limits) > execution_time_tolerance)
{
ROS_ERROR_STREAM("Time diff between [MAX_SPEED/REGULAR_SPEED] --> [" <<
execution_time_check_1 << ", " << execution_time_check_2 <<
ROS_ERROR_STREAM("Time diff between [MAX_SPEED/REGULAR_SPEED] --> [" <<
execution_time_check_1 << ", " << execution_time_check_2 <<
"] & [REGULAR_SPEED/MIN_SPEED] --> [" << execution_time_check_2 <<
", " << execution_time_check_3 << "] is " << delta_time_for_speed_limits <<
", " << execution_time_check_3 << "] is " << delta_time_for_speed_limits <<
"; but tolerance limit is [" << execution_time_tolerance << "]");
}
}
Expand Down Expand Up @@ -623,7 +623,7 @@ TEST_F(UserRobotTest, custom_tool_link)
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "waypoint3", "tool_custom", 4.0));
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, "waypoint1", tool_name, 5.0, joint, 5));
EXPECT_NO_THROW(robot->addTrajPoint(TRAJECTORY_NAME, pose_eigen, "tool0", 6.0));

EXPECT_NO_THROW(robot->execute(TRAJECTORY_NAME));
}

Expand Down
2 changes: 1 addition & 1 deletion moveit_simple/test/launch/kuka_kr210.launch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<!-- The semantic description that corresponds to the URDF -->
<param name="$(arg robot_description)_semantic" textfile="$(find moveit_simple)/test/resources/kuka_kr210/kuka_kr210.srdf" />

<!-- Load updated joint limits (override information from URDF) -->
<group ns="$(arg robot_description)_planning">
<rosparam command="load" file="$(find moveit_simple)/test/resources/kuka_kr210/joint_limits.yaml"/>
Expand Down
2 changes: 1 addition & 1 deletion moveit_simple/test/launch/motoman_mh5.launch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<!-- The semantic description that corresponds to the URDF -->
<param name="$(arg robot_description)_semantic" textfile="$(find moveit_simple)/test/resources/motoman_mh5/config/motoman_mh5_robot.srdf" />

<!-- Load updated joint limits (override information from URDF) -->
<group ns="$(arg robot_description)_planning">
<rosparam command="load" file="$(find moveit_simple)/test/resources/motoman_mh5/config/joint_limits.yaml"/>
Expand Down
Loading

0 comments on commit b85326b

Please sign in to comment.