diff --git a/rrrobot_ws/src/rrrobot/test/test_insert_object.cpp b/rrrobot_ws/src/rrrobot/test/test_insert_object.cpp new file mode 100644 index 0000000..5ae50e2 --- /dev/null +++ b/rrrobot_ws/src/rrrobot/test/test_insert_object.cpp @@ -0,0 +1,34 @@ +#include "rrrobot/model_insertion.h" +#include "ros/ros.h" + +#include + +using std::cin; +using std::cout; +using std::endl; + +int main(int argc, char **argv) +{ + ros::init(argc, argv, "insert_models"); + + ros::NodeHandle nh; + + ros::Publisher pub = nh.advertise("/object_to_load", 1000); + + while (ros::ok()) + { + rrrobot::model_insertion msg; + cout << "Enter the model name: "; + cin >> msg.model_name; + cout << "Enter the pose: " << endl; + cout << "x: "; + cin >> msg.pose.position.x; + cout << "y: "; + cin >> msg.pose.position.y; + cout << "z: "; + cin >> msg.pose.position.z; + + pub.publish(msg); + ros::spinOnce(); + } +} \ No newline at end of file