Simulink/ROS Publishing pose of a 7 DOF arm using moveit_msgs/MoveGroupActionGoal
11 views (last 30 days)
Not being able to update ROs messages in ROS kinetic and Matlab 2020a. I have now moved to ROS Melodic and Matlab 2020b. I have a ROS based model and I control it using Moveit. Now I want to use the ROS toolbox and publish to moveit_msgs in ROS.
I have the following ros actions available
I selected /move_group which has message type as moveit_msgs/MoveGroupActionGoal but I get errors such as
When I assign group name in matlab function block
This assignment writes a 'char' value into a 'uint8' type. Code generation does not support changing types through assignment. Check preceding assignments or input type specifications for type mismatches.
When I try to fill in the other fields for position and orientation
msg.Goal.Request.StartState.MultiDOfJointState.Transforms.Translation.X=0.30; (do the same for translation Y and Z and also for rotation which is in X,Y,Z,W)
This structure does not have a field 'MultiDOfJointState'; new fields cannot be added when structure has been read or used.
I request MathWorks Team to please help me in this regard.
Josh Chen on 29 Jul 2021
In Simulink, each string is represented as an array of uint8 values. As so, when assigning string fields in a message, you need to cast it to uint8 first. You may refer to the "Work with String Arrays" section on this page as an example.
As for the second error, could you please confirm that the spelling is correct? Is it "MultiDOfJointState" or "MultiDOFJointState"? If certain field does not exist in the message, it cannot be added there.
Hope this helps.