Generate trajectory with moveIt based on sensor inputs

asked 2018-05-20 01:48:50 -0500

Markus gravatar image

updated 2018-05-20 08:29:04 -0500

Hey there,

I would like to ask if it is possible to use MoveIt and generate a trajectory control law.

I would like to be able to write some Cpp Code using the MoveIt Library and some sensor Input topics (img or point clouds) and control according to these sensor inputs the endefector of this kuka arm.

Now what I already achieved was to connect RVIZ (moveIt) and gazebo. You also can check this out by checking this link. I am able to plan and execute a trajectory in moveit and it also will be executed in gazebo.

Now if somebody knows some examples on how to control a trajectory with moveit library based on sensor input I would be glat to here them.

Meanwhile I read here:

move_group talks to the robot through ROS topics and actions. It communicates with the robot to get current state information (positions of the joints, etc.), to get point clouds and other sensor data from the robot sensors and to talk to the controllers on the robot.

Controller Interface

move_group talks to the controllers on the robot using the FollowJointTrajectoryAction interface. This is a ROS action interface. A server on the robot needs to service this action - this server is not provided by move_group itself. move_group will only instantiate a client to talk to this controller action server on your robot.

If I also start my current kuka arm via:

roslaunch kuka_kr5_gazebo rviz_connected_with_gz_using_moveit.launch

I use currently use this controller ( ) and an action server to connect rviz with gazebo:


should I also use this action server to execute a continuous trajectory with it according to my sensor input?

rostopic info /arm_controller/follow_joint_trajectory/goal
Type: control_msgs/FollowJointTrajectoryActionGoal

 * /move_group (http://markus:44193/)

 * /gazebo (http://markus:46419/)

I also have several more topics running (just for additional information)


I just found some sources which do similar things I wanna do:

edit retag flag offensive close merge delete


What exactly are you trying to achieve? visual servoing, dynamic pick n place, real-time collision avoidance? There are many ways a robot can be controlled using sensor input.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-05-21 08:07:34 -0500 )edit

I would like to write a service which I can send a position of the endeffector.

Markus gravatar image Markus  ( 2018-05-21 11:53:52 -0500 )edit