private void ReceiveMessage(object sender, MessageEventArgs e) { message = (SensorJointStates)e.Message; for (int i = 0; i < message.name.Length; i++) { JointStateWriters[JointNames.IndexOf(message.name[i])].Write(message.position[i]); } }
private void ReceiveMessage(object sender, MessageEventArgs e) { message = (SensorJointStates)e.Message; for (int i = 0; i < message.name.Length; i++) { if (JointDict.ContainsKey(message.name[i])) { JointDict[message.name[i]].Write(message.position[i]); } } }
private void updateJointStates(Message message) { SensorJointStates sensorJointStates = (SensorJointStates)message; JointPositions = rad2Deg(sensorJointStates.position); JointVelocities = rad2Deg(sensorJointStates.velocity); foreach (JointStateManager jointStateManager in jointStateManagers) { jointStateManager.UpdateJointState(JointPositions[jointStateManager.JointStateId]); } }
private void InitializeMessage() { int jointStateLength = JointStateReaders.Length; message = new SensorJointStates(); message.header = new StandardHeader(); message.header.frame_id = FrameId; message.name = new string[jointStateLength]; message.position = new float[jointStateLength]; message.velocity = new float[jointStateLength]; message.effort = new float[jointStateLength]; }
private void ReceiveMessage(object sender, MessageEventArgs e) { message = (SensorJointStates)e.Message; //Debug.Log(message); for (int i = 0; i < message.name.Length; i++) { //Debug.Log("name: " + message.name[i]); if (JointDict.ContainsKey(message.name[i])) { //Debug.Log("check"); JointDict[message.name[i]].Write(message.position[i]); } } }
private void InitializeMessage() { int jointStateLength = JointStateReaders.Length; message = new SensorJointStates { header = new StandardHeader { frame_id = FrameId }, name = new string[jointStateLength], position = new float[jointStateLength], velocity = new float[jointStateLength], effort = new float[jointStateLength] }; }
public MoveItRobotState() { joint_state = new SensorJointStates(); attached_dof_joint_state = new SensorMultiDOFJointState(); attached_collision_objects = new MoveItAttachedCollisionObject[0]; }