Loading files
68c592872This file is pinned to the selected release. Download the original to open it in your design tool.
//Do not edit! This file was generated by com.unity.simulationpro MessageGeneration.
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Unity.SimulationPro.Foundation;
namespace Unity.SimulationPro.Foundation.MoveitMessages
{
[Serializable]
public class MotionPlanRequestMsg : IMessage
{
public const string k_MessageTypeName = "moveit_msgs/MotionPlanRequest";
public string MessageTypeName => k_MessageTypeName;
public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName);
public MessageTypeId MessageTypeId => k_MessageTypeId;
// This service contains the definition for a request to the motion
// planner and the output it provides
// Parameters for the workspace that the planner should work inside
public WorkspaceParametersMsg workspace_parameters;
// Starting state updates. If certain joints should be considered
// at positions other than the current ones, these positions should
// be set here
public RobotStateMsg start_state;
// The possible goal states for the model to plan for. Each element of
// the array defines a goal region. The goal is achieved
// if the constraints for a particular region are satisfied
public ConstraintsMsg[] goal_constraints;
// No state at any point along the path in the produced motion plan will violate these constraints (this applies to all points, not just waypoints)
public ConstraintsMsg path_constraints;
// The constraints the resulting trajectory must satisfy
public TrajectoryConstraintsMsg trajectory_constraints;
// A set of trajectories that may be used as reference or initial trajectories for (typically optimization-based) planners
// These trajectories do not override start_state or goal_constraints
public GenericTrajectoryMsg[] reference_trajectories;
// The name of the planning pipeline to use. If no name is specified,
// the configured planning pipeline will be used
public string pipeline_id;
// The name of the planning algorithm to use. If no name is specified,
// the default planner of the planning pipeline will be used
public string planner_id;
// The name of the group of joints on which this planner is operating
public string group_name;
// The number of times this plan is to be computed. Shortest solution
// will be reported.
public int num_planning_attempts;
// The maximum amount of time the motion planner is allowed to plan for (in seconds)
public double allowed_planning_time;
// Scaling factors for optionally reducing the maximum joint velocities and
// accelerations. Allowed values are in (0,1]. The maximum joint velocity and
// acceleration specified in the robot model are multiplied by their respective
// factors. If a factor is outside its valid range (importantly, this
// includes being set to 0.0), this factor is set to the default value of 1.0
// internally (i.e., maximum joint velocity or maximum joint acceleration).
public double max_velocity_scaling_factor;
public double max_acceleration_scaling_factor;
// Maximum cartesian speed for the given link.
// If max_cartesian_speed <= 0 the trajectory is not modified.
// These fields require the following planning request adapter: default_planning_request_adapters/LimitMaxCartesianLinkSpeed
public string cartesian_speed_limited_link;
public double max_cartesian_speed;
// m/s
// smoothness of trajectory for FREE command of Pilz planner
// Value should be between 0.01 and 1.0
public double smoothness_level;
public MotionPlanRequestMsg()
{
this.workspace_parameters = new WorkspaceParametersMsg();
this.start_state = new RobotStateMsg();
this.goal_constraints = new ConstraintsMsg[0];
this.path_constraints = new ConstraintsMsg();
this.trajectory_constraints = new TrajectoryConstraintsMsg();
this.reference_trajectories = new GenericTrajectoryMsg[0];
this.pipeline_id = "";
this.planner_id = "";
this.group_name = "";
this.num_planning_attempts = 0;
this.allowed_planning_time = 0.0;
this.max_velocity_scaling_factor = 0.0;
this.max_acceleration_scaling_factor = 0.0;
this.cartesian_speed_limited_link = "";
this.max_cartesian_speed = 0.0;
this.smoothness_level = 0.0;
}
public MotionPlanRequestMsg(WorkspaceParametersMsg workspace_parameters, RobotStateMsg start_state, ConstraintsMsg[] goal_constraints, ConstraintsMsg path_constraints, TrajectoryConstraintsMsg trajectory_constraints, GenericTrajectoryMsg[] reference_trajectories, string pipeline_id, string planner_id, string group_name, int num_planning_attempts, double allowed_planning_time, double max_velocity_scaling_factor, double max_acceleration_scaling_factor, string cartesian_speed_limited_link, double max_cartesian_speed, double smoothness_level)
{
this.workspace_parameters = workspace_parameters;
this.start_state = start_state;
this.goal_constraints = goal_constraints;
this.path_constraints = path_constraints;
this.trajectory_constraints = trajectory_constraints;
this.reference_trajectories = reference_trajectories;
this.pipeline_id = pipeline_id;
this.planner_id = planner_id;
this.group_name = group_name;
this.num_planning_attempts = num_planning_attempts;
this.allowed_planning_time = allowed_planning_time;
this.max_velocity_scaling_factor = max_velocity_scaling_factor;
this.max_acceleration_scaling_factor = max_acceleration_scaling_factor;
this.cartesian_speed_limited_link = cartesian_speed_limited_link;
this.max_cartesian_speed = max_cartesian_speed;
this.smoothness_level = smoothness_level;
}
static string[] s_FieldNames = { "workspace_parameters", "start_state", "goal_constraints",
"path_constraints", "trajectory_constraints", "reference_trajectories", "pipeline_id",
"planner_id", "group_name", "num_planning_attempts", "allowed_planning_time",
"max_velocity_scaling_factor", "max_acceleration_scaling_factor",
"cartesian_speed_limited_link", "max_cartesian_speed", "smoothness_level" };
public static MotionPlanRequestMsg Deserialize(IMessageDeserializer deserializer) => new MotionPlanRequestMsg(deserializer);
private MotionPlanRequestMsg(IMessageDeserializer deserializer)
{
deserializer.BeginMessage(s_FieldNames);
deserializer.Read(out this.workspace_parameters);
deserializer.Read(out this.start_state);
deserializer.Read(out this.goal_constraints);
deserializer.Read(out this.path_constraints);
deserializer.Read(out this.trajectory_constraints);
deserializer.Read(out this.reference_trajectories);
deserializer.Read(out this.pipeline_id);
deserializer.Read(out this.planner_id);
deserializer.Read(out this.group_name);
deserializer.Read(out this.num_planning_attempts);
deserializer.Read(out this.allowed_planning_time);
deserializer.Read(out this.max_velocity_scaling_factor);
deserializer.Read(out this.max_acceleration_scaling_factor);
deserializer.Read(out this.cartesian_speed_limited_link);
deserializer.Read(out this.max_cartesian_speed);
deserializer.Read(out this.smoothness_level);
deserializer.EndMessage();
}
public void WriteTo(IMessageSerializer serializer)
{
serializer.BeginMessage(s_FieldNames);
serializer.Write(this.workspace_parameters);
serializer.Write(this.start_state);
serializer.Write(this.goal_constraints);
serializer.Write(this.path_constraints);
serializer.Write(this.trajectory_constraints);
serializer.Write(this.reference_trajectories);
serializer.Write(this.pipeline_id);
serializer.Write(this.planner_id);
serializer.Write(this.group_name);
serializer.Write(this.num_planning_attempts);
serializer.Write(this.allowed_planning_time);
serializer.Write(this.max_velocity_scaling_factor);
serializer.Write(this.max_acceleration_scaling_factor);
serializer.Write(this.cartesian_speed_limited_link);
serializer.Write(this.max_cartesian_speed);
serializer.Write(this.smoothness_level);
serializer.EndMessage();
}
public override string ToString()
{
return "MotionPlanRequestMsg: " +
"\nworkspace_parameters: " + workspace_parameters.ToString() +
"\nstart_state: " + start_state.ToString() +
"\ngoal_constraints: " + System.String.Join(", ", goal_constraints.ToList()) +
"\npath_constraints: " + path_constraints.ToString() +
"\ntrajectory_constraints: " + trajectory_constraints.ToString() +
"\nreference_trajectories: " + System.String.Join(", ", reference_trajectories.ToList()) +
"\npipeline_id: " + pipeline_id.ToString() +
"\nplanner_id: " + planner_id.ToString() +
"\ngroup_name: " + group_name.ToString() +
"\nnum_planning_attempts: " + num_planning_attempts.ToString() +
"\nallowed_planning_time: " + allowed_planning_time.ToString() +
"\nmax_velocity_scaling_factor: " + max_velocity_scaling_factor.ToString() +
"\nmax_acceleration_scaling_factor: " + max_acceleration_scaling_factor.ToString() +
"\ncartesian_speed_limited_link: " + cartesian_speed_limited_link.ToString() +
"\nmax_cartesian_speed: " + max_cartesian_speed.ToString() +
"\nsmoothness_level: " + smoothness_level.ToString();
}
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
#else
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
public static void Register()
{
MessageTypeRegistry.Register(k_MessageTypeId, Deserialize);
}
}
}