Ask Your Question

MATLAB integration with ROS for Cartesian Motion Planning using Moveit

asked 2016-03-30 22:04:11 -0500

umerhuzaifa gravatar image

updated 2016-03-31 02:50:20 -0500

gvdhoorn gravatar image


I am interested in using MATLAB Robotics Systems Toolbox (RST) to use Moveit in ROS for planning and executing Cartesian Trajectories. I have checked the RViz interface of Moveit in ROS only. I have checked the C++ tutorials for Moveit (which are not as clear as they could be) but I am still not able to pass the desired cartesian paths to ROS. In MATLAB RST, I can only use some services or publish messages to nodes related to target pose planning and executing but I can not figure out what they are.

As an example, I have a 7DOF arm available in ROS with working Moveit in RViz interface.

I can see following topics that I can talk to in MATLAB:

/rviz_RADLab_PC_27799_716056535572644738/motionplanning_planning_scene_monitor/parameter_descriptions /rviz_RADLab_PC_27799_716056535572644738/motionplanning_planning_scene_monitor/parameter_updates

What topics should I publish to?

Has anybody tried this in MATLAB? I know these solutions are available in Python and C++ but I dont want to leave MATLAB because all my algorithms are in m-codes.


edit retag flag offensive close merge delete



It is indeed an old post but I am currently stuck in trying to achieve the same as posted in the question above. I have went upto some extent and I have managed to send trajectory commands but from an m-file (following the PR2 robot example in Matlab for moving arms and that in joint space). But I am struggling with implementing the same from Robotics System Toolbox message and publish blocks.

Any help would be highly appreciated.


gaz_prog gravatar image gaz_prog  ( 2021-03-19 05:14:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-01 01:43:13 -0500

Hamd ul Moqeet gravatar image

I have worked with Robotics Systems toolbox and ROS enabled robots like PhantomX pincher Arm. To find which topics you need to publish to, you can use 'rqt_graph' to figure out. I can only predict the topics. It seems like you have a few action servers running namely seven_dof_arm_joint_controller, gripper_controller, pickup, place, move_group. Action Servers take the goal as an input and output the status or feedback continuously. You can publish to the following topics (my guess only):








To simply move the robot in Joint space you can use topic '/seven_dof_arm/seven_dof_arm_joint_controller/command'. you first have to know the message type of this topic which can be extracted from using the following command in ubuntu terminal: rostopic info /seven_dof_arm/seven_dof_arm_joint_controller/command

once you know the message type you can search for message types documentation on wiki ros page or use 'rosmsg info' in terminal. This is necessary because we need to publish correct type of data structure to the topic, otherwise it wont work. If its a standard message type then you can ignore the details and things become easy. In the simplest case, you must publish the 7 joint variables (angles/d) in radians or meters as a vector(1x7).

You can also publish a complete Joint trajectory on the topic: /seven_dof_arm/seven_dof_arm_joint_controller/follow_joint_trajectory/goal Follow the same procedure as explained above. The following link might be helpful:

To Move the robot in Cartesian space, you can calculate the inverse kinematics in matlab first and then publish the joint angles. I cannot predict which topics need to published to.

In matlab you simply have to initialize to a ros network using rosinit. Then make a publisher object and message object and publish on the topic.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-03-30 21:59:31 -0500

Seen: 1,094 times

Last updated: Mar 30 '16