How to increase CHOMP trajectory way-points?

asked 2022-05-18 13:28:48 -0600

ghelfrich gravatar image

Running ROS Melodic on Ubuntu 18.04. I would like to increase the amount of way-points generated by CHOMP during the path planning pipeline in MoveIt. For example, say I use CHOMP to plan a path between a start and goal state. If I listen to the /joint_states topic during the trajectory execution, I get n states between the start state and the goal state for each joint. I have tried increasing the publishing frequency of the /joint_states topic, but that only yields multiples of the original states. Is there a way to decrease the discretization step size of the trajectory when CHOMP processes a trajectory? I don't see any options in the chomp_planning_config.yaml file for decreasing discretization step size. Thank you!

edit retag flag offensive close merge delete

Comments

If I listen to the /joint_states topic during the trajectory execution, I get n states between the start state and the goal state for each joint.

if this is a real robot (or simulated hw, not MoveIt's kinematic play-out), then the nr of JointState messages typically has no correlation with the nr of JointTrajectoryPoints in your JointTrajectory.

gvdhoorn gravatar image gvdhoorn  ( 2022-05-19 02:34:50 -0600 )edit

This is not a real robot or simulated HW, it is a kinematic representation of a robot. I am using MoveIt to generate a trajectory using various motion planners and extracting the trajectory states for analysis. I do not have a JointTrajectoryPoints or JointTrajectory topic to my knowledge.

ghelfrich gravatar image ghelfrich  ( 2022-05-19 10:41:52 -0600 )edit

I'm not sure I follow.

If you are using MoveIt to plan a trajectory, wouldn't the resulting Plan contain your trajectory -- which contains JointTrajectoryPoints?

Why would you want to "extract trajectory states" from the joint_states topic?

gvdhoorn gravatar image gvdhoorn  ( 2022-05-19 11:23:07 -0600 )edit

Where is plan located? My current action sequence is as follows:

  • open a roscore terminal
  • Launch demo.launch, setting the planning pipeline via command-line (in this case CHOMP)
  • in a separate terminal, launch a node that executes a python script that sets start and goal states, executes the motion, and records the /joint_states topic to a bag file.
  • watch in Rviz as the trajectory is executed on the kinematic representation of the robot
  • extract the /joint_states from the bag file and use the output for analysis in Matlab

Is there an easier way to extract the trajectory? Also, even when I increase the publishing rate of /joint_states, the increased frequency just captures duplicate states, almost like a ZOH signal, leading me to believe the trajectory generation is discretized elsewhere.

ghelfrich gravatar image ghelfrich  ( 2022-05-19 12:08:33 -0600 )edit

launch a node that executes a python script that sets start and goal states

are you pressing buttons in RViz, or using the MoveIt MoveGroup API?

If the first: the plan is 'nowhere' (only internal to RViz). If the second: the result of the planning request is "the plan".

Using RViz as your main entry point to MoveIt is not really the most efficient way to go about this.

You may want to consult the MoveIt tutorials.

gvdhoorn gravatar image gvdhoorn  ( 2022-05-19 12:12:48 -0600 )edit

I am not pressing any buttons in Rviz, I am using the MoveIt MoveGroup API to execute the motion and then visualizing the result in Rviz. I followed the MoveIt tutorials but have been unable to locate "where" the trajectory is stored and how I can access it. I figured the best way would be to monitor the joint state topic, but it lacks the resolution I desire.

ghelfrich gravatar image ghelfrich  ( 2022-05-19 12:27:16 -0600 )edit

The Move Group C++ Interface tutorial has some information on this. Refer to the Planning to a Pose goal section.

gvdhoorn gravatar image gvdhoorn  ( 2022-05-19 14:18:22 -0600 )edit