发送6维的关节角度urscript给ur机械臂,采用机械臂自身的插值解算.
策略一:消息的发布和订阅
因为ur_modern_driver/ur_ros_wrapper.cpp中已经存在订阅器:
urscript_sub_ = nh_.subscribe("ur_driver/URScript", 1, &RosWrapper::urscriptInterface, this);
因此,首先想到的是写一个发布器calibration_glasgow/robot_helper.cpp:
ros::Publisher joint_state_pub = nh.advertise<std_msgs::String>("ur_driver/URScript", 10);
joint_state_pub.publish(msg);
不知道节点有没有成功收到消息,并且很大程度上存在丢包的现象,