Custom driver for robot
Hi all!
I don't know if this question is ROS related, but I am building a custom arm(3 link) robot and have successfully integrated ROS, Moveit and Arduino with my steppers on my robot. Now I need a driver which receives all the messages from ROS to implement a smooth motion on my robot. I've looked into many forums, but I could not find a tutorial on how to make a custom driver for your custom robot. Are there any tutorials available? Let me know
Need more info. What do you mean "sucesfully integrated"?
Are you able to move the motors from ROS and MoveIt already?
Can you expand on "smooth motion"? Do you need to operate them manually or solve some kind of kinematics problem, etc.
Bascially I have an action server which gets the joint trajectory messages from moveit and publishes it to the arduino. Whenever I make a move inside moveit I send the position and velocity to the arduino stepper to make it move. Problem is that I can only send pos and vel values at a certain rate.
This rate is 1Hz. At such a low rate, the arduino receives values one at a time, making the movement jerky. My idea is to publish all pos and vel values for a move at once to the arduino, so that the arduino can make the movements all at once for the corresponding values. Let me know ur thgts?
Where is the rate 1Hz, from PC to Arduino or from Arduino to steppers? Also, would you have any idea what could be giving you that limitation? Afaik there is no such limitation in serial communication, my wild guess would be the program running in arduino set to sleep for 1 second or sth similar.
1Hz from PC to arduino. When I increase the rate it sends all the messages fast/at once and the stepper does not move since it receives so many values at one time. Here is my code https://github.com/pranavb104/Robo-mo...
In your code I am missing the serial part from the PC, how are you sending those msgs to the arduino? I also see in the arduino code that this line is commented:
Please check that the baudrate is the same in the arduino and in the serial communication in the PC
Check the trajectory.cpp file in server folder. In that I'm publishing the arm pos,vel,acc to the arduino. The baud rate works fine.
I see, then I am out of ideas. Try debugging the arduino while connected to a computer using the monitor ,checking that the ros topic is publishing at the rate you want and comparing those numbers. Sorry I couldn't be of more help!