From 35adc729509ebdf3d11eb1d893f6c6d535c5883b Mon Sep 17 00:00:00 2001 From: Derek Witcpalek Date: Sun, 19 Apr 2020 21:27:17 -0400 Subject: [PATCH] Removed extra main functions :) --- .../rrrobot/scripts/rrrobot_run_no_build.sh | 0 .../src/rrrobot/src/object_spawner_node.cpp | 119 +----------------- 2 files changed, 2 insertions(+), 117 deletions(-) mode change 100644 => 100755 rrrobot_ws/src/rrrobot/scripts/rrrobot_run_no_build.sh diff --git a/rrrobot_ws/src/rrrobot/scripts/rrrobot_run_no_build.sh b/rrrobot_ws/src/rrrobot/scripts/rrrobot_run_no_build.sh old mode 100644 new mode 100755 diff --git a/rrrobot_ws/src/rrrobot/src/object_spawner_node.cpp b/rrrobot_ws/src/rrrobot/src/object_spawner_node.cpp index d127f70..53096bb 100644 --- a/rrrobot_ws/src/rrrobot/src/object_spawner_node.cpp +++ b/rrrobot_ws/src/rrrobot/src/object_spawner_node.cpp @@ -18,9 +18,8 @@ using std::endl; class ObjectSpawner { public: - ObjectSpawner(/*ros::NodeHandle *nh_, */ const std::string &model_file = "/app/rrrobot_ws/src/gazebo_models/model_mappings.txt") - : // nh(nh_), - DEFAULT_SPAWN_POINT(1.21825, 5.474367, 0.937978), + ObjectSpawner(const std::string &model_file = "/app/rrrobot_ws/src/gazebo_models/model_mappings.txt") + : DEFAULT_SPAWN_POINT(1.21825, 5.474367, 0.937978), CONVEYOR_WIDTH(0.391404) { // DEFAULT_SPAWN_POINT.x = 0.2516105; @@ -101,120 +100,6 @@ private: } }; -int main(int argc, char **argv) -{ - ros::init(argc, argv, "object_spawner"); - - ObjectSpawner spawner; - - ros::spin(); -} // y range: anything (essentially) - // z - msg.pose.position.x = DEFAULT_SPAWN_POINT.x() /* + some random error */; - msg.pose.position.y = DEFAULT_SPAWN_POINT.y(); - msg.pose.position.z = DEFAULT_SPAWN_POINT.z() + 1.0; - - pub.publish(msg); - ros::spinOnce(); - } - } -}; - -int main(int argc, char **argv) -{ - ros::init(argc, argv, "object_spawner"); - - ObjectSpawner spawner; - - ros::spin(); -} // y range: anything (essentially) - // z - msg.pose.position.x = DEFAULT_SPAWN_POINT.x() /* + some random error */; - msg.pose.position.y = DEFAULT_SPAWN_POINT.y(); - msg.pose.position.z = DEFAULT_SPAWN_POINT.z() + 1.0; - - pub.publish(msg); - ros::spinOnce(); - } - } -}; - -int main(int argc, char **argv) -{ - ros::init(argc, argv, "object_spawner"); - - ObjectSpawner spawner; - - ros::spin(); -} // y range: anything (essentially) - // z - msg.pose.position.x = DEFAULT_SPAWN_POINT.x() /* + some random error */; - msg.pose.position.y = DEFAULT_SPAWN_POINT.y(); - msg.pose.position.z = DEFAULT_SPAWN_POINT.z() + 1.0; - - pub.publish(msg); - ros::spinOnce(); - } - } -}; - -int main(int argc, char **argv) -{ - ros::init(argc, argv, "object_spawner"); - - ObjectSpawner spawner; - - ros::spin(); -} // y range: anything (essentially) - // z - msg.pose.position.x = DEFAULT_SPAWN_POINT.x() /* + some random error */; - msg.pose.position.y = DEFAULT_SPAWN_POINT.y(); - msg.pose.position.z = DEFAULT_SPAWN_POINT.z() + 1.0; - - pub.publish(msg); - ros::spinOnce(); - } - } -}; - -int main(int argc, char **argv) -{ - ros::init(argc, argv, "object_spawner"); - - ObjectSpawner spawner; - - ros::spin(); -} // y range: anything (essentially) - // z - msg.pose.position.x = DEFAULT_SPAWN_POINT.x() /* + some random error */; - msg.pose.position.y = DEFAULT_SPAWN_POINT.y(); - msg.pose.position.z = DEFAULT_SPAWN_POINT.z() + 1.0; - - pub.publish(msg); - ros::spinOnce(); - } - } -}; - -int main(int argc, char **argv) -{ - ros::init(argc, argv, "object_spawner"); - - ObjectSpawner spawner; - - ros::spin(); -} // y range: anything (essentially) - // z - msg.pose.position.x = DEFAULT_SPAWN_POINT.x() /* + some random error */; - msg.pose.position.y = DEFAULT_SPAWN_POINT.y(); - msg.pose.position.z = DEFAULT_SPAWN_POINT.z() + 1.0; - - pub.publish(msg); - ros::spinOnce(); - } - } -}; - int main(int argc, char **argv) { ros::init(argc, argv, "object_spawner");