Simulink/ROS: Publishing JointTrajectory Messages for end effector positions
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I have a human model in Gazebo ROS.The controller is joint trajectory that works fine in ROS environment. Now I have to add a controller but that in Simulink ROS toolbox. Instead of sending Joint Positions I want to send End Effector positions. In other words I am working in Task Space and not in Joint Space. I am unable to access positions from joint trajectory blank message and could not find a solution for quite a while now.
I request if anyone can help me in this regard. I have gone through a question posted in 2017 with title
Simulink/ROS: Publishing JointTrajectory Messages
but it plans in joint space and inputs joint positions. I have to send position commands to my arm group to perform point to point trajectroy planing in Task space(cartesian space). Any help would be appreciated.
Update
As an initial step, I have broken down my problem to first publish one joint position that is to my gripper finger. For this purpose I have used the idea mentioned in the above post highlighted in bold for my gripper joint movement. I do not get any erros in Matlab but I am getting the following error repeatedly in my ROS terminal and hence my joint is not actuated.
Dropping all 1 trajectory point(s), as they occur before the current time. Last point is 0s in the past.
I dont understand why this is happening. Anyhelp would be appreciated please. As if this gets published to the joint and it finally gets actuated, I can eventually take it up further to reach the bigger goal of planning in Cartesian Space.
Thanks
Best
Hasan
0 comentarios
Respuestas (2)
Remo Pillat
el 12 de Mzo. de 2021
Hi Ehtisham,
Please take a look at the "Control PR2 Arm Movements" example in Robotics System Toolbox. It shows how to create a JointTrajectory message and assign the relevant data (see the rGoalMsg.Trajectory variable in the example). You should be able to extrapolate from that for your own robot, e.g. assign the right joint names.
The example also shows how to use Inverse Kinematics in MATLAB to find the right joint positions for your desired end effector pose.
Once you have it working in MATLAB, you should be able to port this to Simulink pretty easily (there are existing blocks for all the functionality you need).
Hope this help.
7 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!