How to get a smooth motion of a JACO-Arm following trajectory points
The jaco arm follows a trajectory points but stops briefly in those points, is there a package or suggestion to eliminate this stops and make the arm move smoothly over the trajectories?
Edit:
#include<iostream>
#include<stdlib.h>
#include<fstream>
#include<string.h>
#include<sstream>
#include<time.h>
using namespace std;
void letswait(int);
int main(int argc, char **argv)
{
char filename[100];
float temp;
int row=0;
stringstream rosrun;
//find out number of rows
strcpy(filename,argv[1]);
ifstream myfile (filename);
if(myfile.is_open())
{
while(!myfile.eof())
{
myfile>>temp;
row++;
}
}
row--;
row=row/6;
//refresh the file read
myfile.clear();
myfile.seekg(0,myfile.beg);
//create dynamic table
float **table;
table = new float* [row];
for(int i=0;i<row;i++)
table[i] = new float [6];
//read the file into table
for (int j=0;j<4;j++)
{
if(myfile.is_open())
{
while(!myfile.eof())
{
//cout<<myfile;
for(int i=0;i<row;i++)
{
for(int j=0;j<6;j++)
{
myfile>>table[i][j];
}
}
}
myfile.close();
}
for(int i=0;i<row;i++)
{
//create string stream for rosrun
rosrun<<"rosrun jaco_demo joint_angle_workout.py jaco "<<table[i][0]<<" "<<table[i][1]<<" "<<table[i][2]<<" "<<table[i][3]<<" "<<table[i][4]<<" "<<table[i][5];
//call rosrun jaco_demo with one set of angles
system(rosrun.str().c_str());
//clear stream
rosrun.str("");
if (j == 0 && i == 0)
{
rosrun<<"rosrun jaco_demo grip_workout.py jaco 60 60 60";
system(rosrun.str().c_str());
rosrun.str("");
}
}
return 0;
}
void letswait(int secs){
clock_t end;
end=clock()+secs*CLOCKS_PER_SEC;
while(clock()<end);
}
Can you add information about how you are currently commanding the trajectories?
i have attached the code bellow. I am taking a set of points (joint angles) from a text file and giving as an input. But the arm pauses at each point and then moves to the next. I want it not to stop and move smoothly. Please suggest
@kural: please do not post answers that are not actually answers. If you need to provide more information, edit your original question. Use the edit link/button below your question for that.
sorry @gvdhoorn . New here. :-)