Hi, I am trying to send JointTrajectory Message on a topic in ROS from unity. I noticed that the ROS-TCP_Connector package in unity already comes with C# classes of many messages including the JointTrajectory and JointTrajectoryPoint messages. I am trying to use those as follows in a script:
JointTrajectoryPointMsg[] trajectoryPointMessage = new JointTrajectoryPointMsg[1];
trajectoryPointMessage[0] = new JointTrajectoryPointMsg();
trajectoryPointMessage[0].positions = jointAngles;
trajectoryPointMessage[0].velocities = new double[0];
trajectoryPointMessage[0].accelerations = new double[0];
trajectoryPointMessage[0].effort = new double[0];
JointTrajectoryMsg trajectoryCommandMessage = new JointTrajectoryMsg();
trajectoryCommandMessage.joint_names = jointNames;
trajectoryCommandMessage.points = trajectoryPointMessage;
here jointAngles is a double array and jointNames is string array. Running this script seems to throw NotImplementedException but I am able to figure out the reason. I have tried using custom messages as well as some messages from std_msgs and all of them work. But JointTrajectory messages are throwing the exception.