Setup of an /trajectory_msgs/JointTrajectory message in Simulink
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Martin Rupp
el 30 de Jun. de 2020
Comentada: Ehtisham ul Hasan
el 16 de Abr. de 2021
Hello,
i am currently working on interfacing Matlab 2018a with Gazebo on a Virtual Machine. I want to design a robot controller in Simulink and simulate the dynamics of the mobile manipulator(KUKA youBot) in Gazebo.
I have already setup Matlab/Simulink and ROS/Gazebo. I can subscribe and publish messages like /odom or /vel_cmd. But I have problems to setup a /trajectory_msgs/JointTrajectory message to control the movement of the arm. I seem to not be able to setup the message correctly.
For the elements JointNames and Points the error message said that the bus structure doesn't match. And for Points.Positions, Points.Velocities, Points.Accelerations the error states that I cannot acces this data as it is inside a bus element. Can someone help me how to setup this ROS message correctly?
Thank you in advance and if you need further information feel free to ask me.....
1 comentario
Ehtisham ul Hasan
el 16 de Abr. de 2021
Hey Martin,
I have been stuck for quiet in the same issue for a while now and thanks to Mathworks Team who have been highly not supportive. I want to know if you succeeded in bridging the trajectory messages from Simulink to ROS Gazebo?
Your kind response is requested.
Thanks
Best
Hasan
Respuesta aceptada
Josh Chen
el 24 de Nov. de 2020
Hello Martin,
The message trajectory_msgs/JointTrajectory contains variable-length arrays such as the 'Points' here shown on the screenshot. It is difficult to construct such signal directly through Simulink source blocks directly. The recommended way of assigning these properties in Simulink message is to use a MATLAB Function block. This example shows how to assign elements inside a ROS message in Simulink using MATLAB Function block.
Hope this helps,
Josh
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Network Connection and Exploration en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!