OSU-AIMS / light_painting

Demonstration project which traces a LED EEF through space for a long-exposure photo.
Apache License 2.0
0 stars 0 forks source link

Using a different type of Cartesian Motion Planner #1

Closed MohammadKhan-3 closed 2 years ago

MohammadKhan-3 commented 2 years ago

Running into this error when using MoveIt's Cartesian Motion Planner: [ERROR] [1648220633.617375544]: Validation failed: Missing velocity data for trajectory pt 0

Potential reasons:

Computer Environment:

Next Steps:

acbuynak commented 2 years ago

I'm working on implementing an pure C++ example of the Descartes Planner. My notes are here https://github.com/OSU-AIMS/paper-glider/issues/2, but I'll cross-post here if/when I get it working.

acbuynak commented 2 years ago

Out of curiosity, I dug into the Python API on the default move_group.compute_cartesian_path().

def compute_cartesian_path(self,
         waypoints,
         eef_step,
         jump_threshold,
         avoid_collisions=True,
         path_constraints=None )

Thus far, I don't think we've ever tried setting the path_collisions parameter. According to the C++ API, this parameter is an instance of a custom moveit_msg called Constraints. Msg format here.

Unfortunately, this message doesn't detail any time based info, but does allow tolerancing the positioning system. ie Applying a tolerance to joints or tool position/orientation. @hansen95 This may be useful for you on future projects.

acbuynak commented 2 years ago

One option to consider instead of pursuing an entirely separate planner would be to only grab the position data from the output path trajectory. Then write your own velocity/acceleration into the trajectory message and send that to the robot.

compute_cartesian_path() returns two variables: path and fraction. fraction is the 0-1 (0-100%) portion of the path that the solver generated. path is a moveit_msgs::RobotTrajectory message object containing a list of waypoints. Each waypoint has position, velocity, acceleration, and time_from_start information.

Basically, we could go in and overwrite the velocity, acceleration, and time_from_start data for each waypoint. Velocity and acceleration could be computed from a combination of the desired time to achieve, the position data, and a velocity scaling equation.

I don't think this is a great solution, but it would get you going. Further, you would be able to more finely generate a trajectory then issue additional commands.

Initially, I think we should be sending trajectories starting from each 'point' (or light-pixel) of the path to the next one and not one long continuous motion (I don't think this was your intention though). But I don't know how well this will transition to the continuous light-painting demo, but it would help get us moving.

acbuynak commented 2 years ago

Successfully deployed a basic demo using a Descartes DensePlanner to build a trajectory. This is a pure C++ implementation in the osu-aims/paper-glider repo.

acbuynak commented 2 years ago

Finished an ROS Action server implementation of a Descartes Cartesian planner which accepts an input goal pose and linear interpolates in Cartesian space from current to goal pose.

Applied in the /descartes-action-server branch.