Revision history [back]

Articulated vehicle control in gazebo and ROS

Hello all, I have an articulated vehicle model in (urdf.xacro) format. The vehicle has two parts (front and rear) connected to each other by a joint. I have established a node (in python) which has: 1- a publisher, which publish a new model pose to the topic "gazebo/set_model_state". 2- a service "'/gazebo/set_model_configuration'", which controls the position of the joint. After connecting gazebo to ROS and starting this node, controlling the model was fine. NOW, I have to control each part autonomously (considering each part as a separate model). Therefore, 1- I established two xacro files one for each part, thus, I get two models (front model and rear model) 2- For each model, I created a launch file 3- Finally I created launch file to launch both models together into gazebo. The two models will launch as they were connected to each other. Afterward, I rewrote the python code to control two models instead of one. In This node, I am using the topic "gazebo/set_model_state" to send new poses of the models. And I got the following problems: 1- If I started gazebo "unpaused" the two models push each other randomly and fly around. 2- Even when starting gazebo "paused", when giving an articulated angle command, each model has to change its orientation angle relative to the articulated angle, but only the rear part does that. I will be very appreciated to get any help from you to solve these problems. Best regards

 2 None kumpakri 755 ●80 ●93 ●104

Articulated vehicle control in gazebo and ROS

Hello all, I have an articulated vehicle model in (urdf.xacro) format. The vehicle has two parts (front and rear) connected to each other by a joint. I have established a node (in python) which has: 1- has:

1. a publisher, which publish a new new model pose to the topic "gazebo/set_model_state". 2- a service "'/gazebo/set_model_configuration'", topic gazebo/set_model_state.
2. a service /gazebo/set_model_configuration, which controls the position of the joint. the joint.

After connecting gazebo to ROS and starting this node, controlling the model was fine. NOW, I have to control each part autonomously (considering each part as a separate model). Therefore, 1- Therefore,

1. I established two xacro files one one for each part, thus, I get two two models (front model and rear model) 2- model)
2. For each model, I created a launch file 3- launch file
3. Finally I created launch file to to launch both models together into into gazebo. The two models will launch launch as they were connected to each other. each other.

Afterward, I rewrote the python code to control two models instead of one. In This node, I am using the topic "gazebo/set_model_state" gazebo/set_model_state to send new poses of the models. models.

And I got the following problems: 1- problems:

1. If I started gazebo "unpaused" the the two models push each other randomly randomly and fly around. 2- around.
2. Even when starting gazebo "paused", "paused", when giving an articulated angle angle command, each model has to change change its orientation angle relative to to the articulated angle, but only the the rear part does that. that.

I will be very appreciated to get any help from you to solve these problems. Best regards

Articulated vehicle control in gazebo and ROS

Hello all, I have an articulated vehicle model in (urdf.xacro) format. The vehicle has two parts (front and rear) connected to each other by a joint. I have established a node (in python) which has:

1. a publisher, which publish a new model pose to the topic gazebo/set_model_state.
2. a service /gazebo/set_model_configuration, which controls the position of the joint.

After connecting gazebo to ROS and starting this node, controlling the model was fine. NOW, I have to control each part autonomously (considering each part as a separate model). Therefore,

1. I established two xacro files one for each part, thus, I get two models (front model and rear model)
2. For each model, I created a launch file
3. Finally I created launch file to launch both models together into gazebo. The two models will launch as they were connected to each other.

Afterward, I rewrote the python code to control two models instead of one. In This node, I am using the topic gazebo/set_model_state to send new poses of the models.

And I got the following problems:

1. If I started gazebo "unpaused" the two models push each other randomly and fly around.
2. Even when starting gazebo "paused", when giving an articulated angle command, each model has to change its orientation angle relative to the articulated angle, but only the rear part does that.

I will be very appreciated to get any help from you to solve these problems. Best regards

EDITED: The problem was solved by defining the both model as kinematic models in the xacro files.