Simple URDF vehicle model
Hi,
I have been using Gazebo for a few days and I need to simulate a wheeled vehicle, guided via keyboard, housing a GPS and an IMU. In order to do that, I found and followed this tutorial, explaining how to create and simulate an URDF model of a robot:
https://www.generationrobots.com/blog/en/2015/02/robotic-simulation-scenarios-with-gazebo-and-ros/
However I have noticed the following problems:
1) the graphic simulation is not consistent with the keyboard input commands: a "real time response" occurs only after many minutes from the simulation start.
2) I added a GPS to the "mybot.gazebo" file, using the following code:
<gazebo>
<plugin name="name_gps" filename="libhector_gazebo_ros_gps.so">
<alwayson>1</alwayson>
<updaterate>10.0</updaterate>
<bodyname>chassis</bodyname>
<topicname>mybot/gps_fix</topicname>
<velocitytopicname>mybot/gps_fixvelocity</velocitytopicname>
<drift>5.0 5.0 5.0</drift>
<gaussiannoise>0.1 0.1 0.1</gaussiannoise>
<velocitydrift>0 0 0</velocitydrift>
<velocitygaussiannoise>0.1 0.1 0.1</velocitygaussiannoise>
</plugin>
</gazebo>
However, despite not having encountered any error/warning from the GPS plugin, the /mybot/gpsfix and /mybot/gpsfixvelocity do not appear on the rostopic list.
Does anyone know how to fix these problems?
Thank you in advance
Asked by Nicola on 2017-10-30 09:25:00 UTC
Answers
For the first problem you need to tune the PID control parameters in mybot_control/config/mybot_control.yaml
. The following works for me:
# Effort Controllers ---------------------------------------
leftWheel_effort_controller:
type: effort_controllers/JointEffortController
joint: left_wheel_hinge
pid: {p: 18.0, i: 0.1, d: 2.0}
rightWheel_effort_controller:
type: effort_controllers/JointEffortController
joint: right_wheel_hinge
pid: {p: 18.0, i: 0.1, d: 2.0}
I don't have an answer to your 2nd question. Also I think you should post a separate question since the 2 questions are not related to each other.
Asked by Subodh Malgonde on 2018-08-23 03:00:57 UTC
Comments