Articulated vehicle control in gazebo and ROS

asked 2020-05-13 05:09:01 -0500

adel gravatar image

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 apreciated to get any help from you to solve these problems. Best regards

edit retag flag offensive close merge delete


@adel Hi. Could you please help me about creating a articulated vehicle model in urdf/xacro format too? I want to simulate my operation on gazebo and I need some work as a reference to create my own model.

alperenkeser gravatar image alperenkeser  ( 2023-07-26 07:58:21 -0500 )edit