EGM Not Executing Movements - Issue with Protobuf Messages in ABB RobotStudio #101
Closed
bamburaptor
started this conversation in
General
Replies: 3 comments 2 replies
-
I'll leave this open, but please realise this repository is for the ROS 1 ABB robot driver. It's not a generic EGM discussion forum. I'd advise you to post on ABB's own fora instead. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I’m currently working on a project involving ABB RobotStudio where I’m using External Guided Motion (EGM) to control a robot through UDP messages. The robot should move based on the joint positions I send from Simulink, but it’s not executing the movements as expected. Here’s a detailed breakdown of what I’ve done so far:
Setup:
I’m using Simulink to generate the joint position data, which is then serialized using Protobuf. The serialized data is sent via UDP to the robot.
`/* Includes_BEGIN /
#include <math.h>
#include
#include
#include "egm.pb.h"
#include <Windows.h>
#include <sysinfoapi.h>
/ Includes_END */
/* Externs_BEGIN /
/ extern double func(double a); /
/ Externs_END */
void sensor_proto_Start_wrapper(SimStruct S)
{
/ Start_BEGIN /
/
/
/ Start_END */
}
void sensor_proto_Outputs_wrapper(const real_T *J1,
const real_T *J2,
const real_T *J3,
const real_T *J4,
const real_T *J5,
const real_T *J6,
uint8_T *serialized_sensor_message,
int32_T *sensor_message_byte_len,
SimStruct S)
{
/ Output_BEGIN */
static unsigned int sequenceNumber = 0;
abb::egm::EgmHeader *header = new abb::egm::EgmHeader();
header->set_seqno(sequenceNumber++);
header->set_tm(GetTickCount());
header->set_mtype(::abb::egm::EgmHeader_MessageType_MSGTYPE_CORRECTION);
abb::egm::EgmJoints *joint_var = new abb::egm::EgmJoints();
joint_var->add_joints(J1[0]);
joint_var->add_joints(J2[0]);
joint_var->add_joints(J3[0]);
joint_var->add_joints(J4[0]);
joint_var->add_joints(J5[0]);
joint_var->add_joints(J6[0]);
abb::egm::EgmPlanned *planned = new abb::egm::EgmPlanned();
//planned.mutable_joints()->CopyFrom(joint_var);
planned->set_allocated_joints(joint_var);
abb::egm::EgmSensor *sensor_message = new abb::egm::EgmSensor ();
sensor_message->set_allocated_header(header);
sensor_message->set_allocated_planned(planned);
*sensor_message_byte_len = sensor_message->ByteSizeLong();
sensor_message->SerializeToArray(serialized_sensor_message,sensor_message_byte_len);
/ Output_END */
}
void sensor_proto_Terminate_wrapper(SimStruct S)
{
/ Terminate_BEGIN /
/
/
/ Terminate_END */
}`
Protobuf Setup:
I’ve defined the Protobuf messages in a .proto file, which includes EgmSensor, EgmHeader, and EgmPlanned messages. These messages are built correctly in C++ and serialized before sending.
RobotStudio Configuration:
I’ve configured the Transmission Protocol in RobotStudio to receive messages on the correct IP address and port (127.0.0.1:5514).
The robot appears to receive the messages (no errors in the UDP communication), but it doesn’t execute the movement.
made on local host cause i'm working on the same computer
Problem:
Despite everything seeming correct, the robot does not move to the new joint positions. I’ve confirmed that the messages are being sent, but the robot stays in its initial position.
What I’ve Tried:
Ensured that the values of the joint positions are within valid limits.
Checked the serialization process to ensure that the data is correctly formatted.
Monitored the logs in RobotStudio, but haven’t found any clear indications of what might be wrong.
ROBOT STUDIO SETTINGS ARE
rapid program
`MODULE TestyEGM
VAR egmident egmID1;
VAR egmstate egmSt1;
ENDMODULE`
Is there something specific I need to configure in RobotStudio to handle these EGM messages correctly?
or something it's wrong? i can't figure out
Beta Was this translation helpful? Give feedback.
All reactions