Hello, I'm getting this error. three_dof_planar_manipulator/Floats_array.h: No such file or directory when compiling in arduino. I tried every method in google like including DIRS etc., still no use. Please help me
First this is a great video, I've been learning ROS for months but can't find any tutorials on real physical project that interact with Arduino. You've taught me a lot! Second, would you mind explaining what the Arduino code is doing? especially the rotate_servo() and servo_cb() function. Thanks in advanced!
Thank you. I am using publish/subscribe interface to send joint commands TO arduino and service/client interface to send joint angles FROM arduino. So, when ever I am publishing new joint commands to arduino, servo_cb callback is called which in turn calls rotate_servo() method with new joint position commands. Now rotate_servo() will move all servos to target angles. The callback() is the service server and its corresponding client is in ros_hw_interface node. So when ever ros hw interface node asks for current joint positions, callback() in arduino will be called and callback() will send the current joint positions of the servos. Hope this clears your doubt. Regards, Sai Krishna.
@@roboticsandroslearning8232 That clears up a lot of things. Thank you so much for your fast respond! I needed to understand this project to advanced my understanding of ROS. Thank you for making the tutorial!
@@roboticsandroslearning8232 I have another question if you don't mind. I have a problem in motor control section. When connect ros to arduio mega using , i get [Error]: Service call failed: service [/read_joint_state] responded with an error: service cannot process request: service handler returned None. I can send command to arduino to rotate the servo, but I'm not getting the feedback, I assumed it has to do with the Error that I got. I can't figure out how to solve this error. I'm using ros melodic by the way. Thanks in advanced!
@@sheenaymu check if your arduino ros_lib have this message "three_dof_planar_manipulator::Floats_array" Else you have to update your ros_lib message. Follow below tutorial wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup
@@roboticsandroslearning8232 So I solved part of my problem. I changed 3 things from my previous post. 1. change my arduino board from arduino uno to arduino mega. 2. modify the rosserial_python's SerialClient.py file. 3. Modified your arduino_code.ino's callback() function. From my previous post, I couldn't connect to the arduino board at all. I did a little of research. (1.) I changed my board from arduino uno to arduino mega. (2.) Since I'm using ROS melodic, I replaced the SerialClient.py in /opt/ros/melodic/lib/python2.7/dist-packages/rosserial_python that comes with ROS melodic with ROS kinetic SerialClient.py. By doing these 2 changes, I was able to connect with the arduino board, but I get another problem. I can send command from ROS to all the servos, But I have problem reading from the feedback. When I run your arduino code, arduino_code.ino, I can only read the feedback info from one signal. For example, what you did at 9:00 for all 3 of your servos, I can only do it for only one of my servo. (3.) When I change the arduino_code.ino's callback() function by setting one of the res.res[] = constant, like a number, I can read the feedback info from 2 servos. However when I set all 3 res.res[i] = analogRead(i), respectively, only one servo reads the feedback. I tested all the servos. They all work individually, but when I tried to read from all three servos feedback, only 1 works with your default arduino_code.ino. 2 works when I set one of the res.res[] = const. Right now I'm just tinkering with the Baud rate and understanding the serial_node.py code. Thank you for taking the time to help me out, I read all rosserial_arduino tutorials in roswiki and searched my problems in ros answers, but my problem persist.
Thank you very much for this video. For the past couple of days I have been trying to figure out how I can control hardware with ROS_control. I have the simulations of my robot working through gazebo but I still don't know how to move from simulation to the real robot.
how to modify the inverse kinematic marker.py file for 6dof...can it b done? i finished testing of 6dof(simulated arm) in gazebo with moveit pkg....and i want to work on the kinematics next. so interactive marking would be a good start right?
Since you have completed working on 6 dof arm in gazebo using moveit, I think you have already worked on inverse kinematics. Interactive markers can only be used in rviz, not in gazeo and moveit already provides a interactive marker.
@@roboticsandroslearning8232 what i want to implement is like to ...give a coordinate xyz ..and the robot(wid end effector) shud move to that coordinate point using any ik....so what should b my next approach? 2nd how to connect to a real robot. i just want to know it like in steps.
Please explain how to compile the arduino code. It always has the following error : arduino_code:3:10: fatal error: three_dof_planar_manipulator/Floats_array.h: No such file or directory #include . If i set the path manually to Floats_array.h, then it gives the following error fatal error: ros/service_traits.h: No such file or directory #include .
IN WHICH FILE IS THE DIMENTIONS OF LINKS AND HOW YOU CALCULATE IT AND I WANT TO KNOW WHERE IS THE FORWORD AND INVERSE FILES AND WHICH PROGRAMMING LANGUAGE YOU USE
Hello actually I'm also using rosserial for controlling 5 DOF arm and I'm using 3 sg90 and 3 mg996r servo motors , so when I give joint angles to the arm it doesn't follow the required trajectory properly and inbetween joint: 0 starts to get subscribed when it's not present in code. Please help me figure out the issue also give ur mail id so I can elaborate my issue well. Thank you
Hello Sai Krishna!! First of all, I would like to congratulate you for that project and also for the video, everything is very clearly explained, I am sure it takes you a lot of time. Thank you!! And I would like to ask you in which version of ROS did you run this project, now I have Ubuntu 20.04 and noetic, did you use melodic maybe? I would like to develop one similar project and I am thinking on which version should I do it, perhaps with noetic I will find more source that will help me. Kind regards, Sergio.
i am getting a Controller Spawner couldn't find the expected controller_manager ROS interface. error What should do.I checked that all namespaces are correct. But still problem persists.
Hi Sohan Anisetty, Do you have the control_manager package installed in your environment? Try installing complete ROS control package using below command and check. For ROS Kinetic: $ sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers For ROS Lunar: $ sudo apt-get install ros-lunar-ros-control ros-lunar-ros-controllers For ROS Melodic: $ sudo apt-get install ros-melodic-ros-control ros-melodic-ros-controllers If the problem still exists revert back.
can't i test this hardware interface concept without using real harddwaer in this code? eg. can't i just replace the read, write functiosn of hardare interface with some dummy values to test it?
Yes you can! Use demo.launch file to run the robot. It provide fake controllers. So in this case you need not use hardware interface node. You can subscribe or publish on fake controllers to control the robot.
hello sir how are you I am working on 3 dof robotic arm I have completed my moveit but I am not aware from python please help me in my final year project I will glad and waiting for your response
when write the command : roslaunch three_dof_planar_manipulator check_urdf.launch the error is : RLException: Invalid tag: Cannot load command parameter [robot_description]: no such command [['/opt/ros/noetic/share/xacro/xacro.py', '/home/mashhour/ros/hrwros_ws/src/three_dof_planar_manipulator/urdf/three_dof_planar_manipulator.urdf.xacro']]. Param xml is The traceback for the exception was written to the log file
Hi, I am a mechatronics engineer, I am currently doing my project. The idea is that I have a manipulator and a webcam. With the help of a webcam, I can detect a flat object on the table and move it to the right place. I use YOLOv8 as my computer vision model. I can get the coordinates of the object on the table, but I need the manipulator can calculate the trajectory of movement and be able to take the object on its own. For this I plan to use ROS. Can you help me with this? Maybe you can advise me sources where I can find information on how to do this? Is ROS the best choice here? I will be very grateful if you help. Thank you!
Thanks Osama Shaheen. You can get the ik_marker.py code from my git hub. The link to this file is attached below github.com/bandasaikrishna/3-DOF_Manipulator/blob/master/three_dof_planar_manipulator/scripts/ik_marker.py
Can one log the combination of joint angles produced by the *simulato*r for the desired movements to a csv file ...for later use by a stand-alone embedded device?
Yes. You can either subscribe to "/joint_states" topic or use "move_group.get_current_joint_values()" to get the current joint position values. Then later you can use "move_group.go(joint_goal, wait=True)" to execute the logged joint positions.
@@roboticsandroslearning8232 I am trying to make a robotic arm where controled by a smart phone and I need to code it easy to . that's why I am ask you that how to store the positions of that servos to Arduino and run the code when I click the specific button on that android app. Can you help me
can you tell me which launch file should i use to run for the real robot and can you provide us more details for your project architecture and some documentation on github
Hi Houssem Trabelsi, For real robot you can either run real_robot.launch file in three_dof_planar_manipulator_moveit_config package or check_motor_controls.launch file in three_dof_planar_manipulator package. Along with this launch file you also have to run serial_node to communicate with arduino. I have a plan to describe in detail about this manipulator in my blog but it will take some time as I'm currently busy with other things. Most of the details are covered in the video itself. If you still have any query feel free to post it in the comments.
@@roboticsandroslearning8232 after a long period i found the problem you should put the exact dimension of your res array so in Floats_array.srv you change float32 req --- float32[7] res number of joints and every thing it will be ok it works for me
Floats_array.h is a custom message generated by three_dof_planar_manipulator package. You can find this file in srv folder of three_dof_planar_manipulator package. github.com/bandasaikrishna/3-DOF_Manipulator/tree/master/three_dof_planar_manipulator/srv.
Hi @@Geonbbang Sorry, I didn't get your question. Can you be more specific about your question. What exactly you want to know. How to add a custom srv file in you package or how to use Floats_array.h file..?
Hi @@Geonbbang , Floats_array.h is not a default ros message. This is generated in the "three_dof_planar_manipulator" package. So this is a custom message. To add custom message headers to arduino library, delete the old "ros_lib" folder(if exists) inside ~/sketchbook/libraries and run below command, Command: rosrun rosserial_arduino make_libraries.py ~/sketchbook/libraries ROS wiki link: wiki.ros.org/rosserial/Tutorials/Adding%20Other%20Messages If you still have any question, feel free to ask.
hi sir , i m working on a robot arm but 5 joint so i need 5 servos i modify your code all works fine but i have a problem that makes me crazy : res.res[0]=(readservo1-100) * (180.0/325.0); res.res[1]=(readservo2-100) * (180.0/325.0); res.res[2]=(readservo3-100) * (180.0/325.0); res.res[3]=(readservo4-100) * (180.0/325.0); res.res[4]=(readservo5-100) * (180.0/325.0); i get a problem : [ERROR] [1567290319.121358]: Lost sync with device, restarting... i think i means too much data . i can't find a solution for this error please help me sir
Hi Houssem Trabelsi, Yes, I faced the same issue when working with 6-DOF arm. So I have stopped reading the joint position values and made a work around for "ROBOTHardwareInterface::read()" in robot_hardware_interface_node.cpp file. Check robot_hardware_interface_node.cpp and arduino_code.ino form my 6-DOF_Manipulator code. 6-DOF_Manipulator: github.com/bandasaikrishna/6-DOF_Manipulator Hope this could solves your issue.
after a long period i found the problem you should put the exact dimension of your res array so in Floats_array.srv you change float32 req --- float32[7] res number of joints and every thing it will be ok it works for me@@roboticsandroslearning8232
Hi @@houssemtrabelsi6090 , I happy that you have solved the error. You fixed the error by setting the length of the array to a fixed length in the srv file. We are setting the length of the array in our arduino code as well ("res.res_length=3;"). So our arduino should work fine too. Have you tried changing length to 7 in arduino code "res.res_length=7;"..? If not, can you try changing the length and let me know the result. Check below links for understanding array messages for rosserial. wiki.ros.org/rosserial/Overview/Limitations wiki.ros.org/rosserial/Overview/Messages
@@roboticsandroslearning8232 Thanks a lot bro. It would be very helpful if you could guide me through which extensions are needed and where they are required. I'm quite new at this and would very much appreciate the help