# Revision history [back]

### set the position of a robot while joint/SetAngle is used

Hi! I am working on a real and a simulated robot to compare the real sensors to the "perfect" ones in gazebo. I have a system to detect the position of the real robot, and I am able to position the simulated robot in a simulated room, by publishing in the topic /gazebo/set_model_state. This is working fine. I also need the simulated robot to mimic the position of the joints of the robot. I created a plugin that uses

this->model->GetJoint(vecteur_str[i])->SetAngle(0, angle);


This is also working fine, but if I use both programs together, a strange behavior happens:

The robot on the right is the one that is positionned by my tracking program and with the plugin working, and the left one is the robot with just the plugin working. I made the robot look up for the screenshot, the left one is good whereas the head of the second one comes off the rest of the body as if the rotation of the joint was from another origin. If anyone has an idea of why I get this behaviour? I also would like to set the position of the model from my plugin but I can't find a relevant function in the API.

### set the position of a robot while joint/SetAngle is used

Hi! I am working on a real and a simulated robot to compare the real sensors to the "perfect" ones in gazebo. I have a system to detect the position of the real robot, and I am able to position the simulated robot in a simulated room, by publishing in the topic /gazebo/set_model_state. This is working fine. I also need the simulated robot to mimic the position of the joints of the robot. I created a plugin that uses

this->model->GetJoint(vecteur_str[i])->SetAngle(0, angle);


This is also working fine, but if I use both programs together, a strange behavior happens:

The robot on the right is the one that is positionned by my tracking program and with the plugin working, and the left one is the robot with just the plugin working. I made the robot look up for the screenshot, the left one is good whereas the head of the second one comes off the rest of the body as if the rotation of the joint was from another origin. If anyone has an idea of why I get this behaviour? I also would like to set the position of the model from my plugin ( becasue maybe it could solve the problem if there is just one pg to set the model) but I can't find a relevant function in the API.

### set the position of a robot while joint/SetAngle is used

Hi! I am working on a real and a simulated robot to compare the real sensors to the "perfect" ones in gazebo. I have a system to detect the position of the real robot, and I am able to position the simulated robot in a simulated room, by publishing in the topic /gazebo/set_model_state. This is working fine. I also need the simulated robot to mimic the position of the joints of the robot. I created a plugin that uses

this->model->GetJoint(vecteur_str[i])->SetAngle(0, angle);


This is also working fine, but if I use both programs together, a strange behavior happens:

The robot on the right is the one that is positionned by my tracking program and with the plugin working, and the left one is the robot with just the plugin working. I made the robot look up for the screenshot, the left one is good whereas the head of the second one comes off the rest of the body as if the rotation of the joint was from another origin. If anyone has an idea of why I get this behaviour? I also would like to set the position of the model from my plugin ( becasue because maybe it could solve the problem if there is just one pg to set the model) but I can't find a relevant function in the API.