Closed shreyasgan closed 6 years ago
You also posted this on ROS Answers (here). I've responded there.
For the future: please refrain from cross-posting like this. It is not a very nice practice.
Dear shreyasgan, i am also facing the same issue. I have cartesian planner that gives me out on the topic with sensor_msgs/JointState and in order to command the robot, the type of topic is trajectory_msgs/TrajectoryState. Can you please help me how did you do that?
Thank You
Hello,
I am trying to send my Staubli TX90 robot arm a Joint Trajectory command which publishes to /joint_path_command, which the motion_streaminginterface node subscribes to. My code complies and build correctly, but when I run the node, there is an error saying "Trajectory splicing not yet implemented, stopping current motion." I looked online and noticed that: // read current state value (should be atomic) int state = this->state;
ROS_DEBUG("Current state is: %d", state); if (TransferStates::IDLE != state) { if (msg->points.empty()) ROS_INFO("Empty trajectory received, canceling current trajectory"); else ROS_ERROR("Trajectory splicing not yet implemented, stopping current motion.");
This is my code for the node that I am running to communicate with the robot arm and subscribe to /joint_states and publish to /joint_path_command:
using namespace std;
sensor_msgs::JointState JS;
void jointStateCallback(const sensor_msgs::JointState msg) { JS = msg; }
int main(int argc, char** argv) { ros::init(argc, argv, "mover_node"); ros::NodeHandle n; ros::AsyncSpinner spinner(1); spinner.start();("/joint_path_command", 1);
ros::Subscriber joint_sub = n.subscribe("/joint_states", 1, jointStateCallback);
bool success; ros::Publisher joint_pub = n.advertise
{ //if(JS.position.size() != 0) cout << JT << endl; JT.points[0].positions = JS.position; JT.points[0].positions += 0.1;
}