I have built a simple chassis with left and right wheels with two separate motor controllers. The motor controllers are on a simple CAN communications bus. I've written an ROS service that sends the appropriate CAN messages to command each motor to any velocity it is capable of. I call that service from an ROS node that is subscribed to the standard geometry /cmd_vel Twist type message, which can be published by the example turtlebot-tele-op node or from the RQT plugin Robot Steering.
This is sort of the chain of events: Robot Steering -> [Twist Messages] -> Locomotion Node -> [API Messages] -> Motor API Service -> [CAN frames] -> Motor Controllers -> [current, amps] -> Motors
So I've done all this and it works fine, but I still feel like a newbie because I cannot figure out how to run all my software in Gazebo. Sure it's running on real hardware, but I'd like to add complexity and I want to test that complexity in simulation before running it on real hardware.
So I've used this ROS/Gazebo Integration Differential Drive tutorial (http://gazebosim.org/wiki/Tutorials/1.9/ROS_Motor_and_Sensor_Plugins#Differential_Drive) to attach a differential drive plugin to a simple two wheeled and caster simulated robot in Gazebo and it allows me to drive the robot around the sim from the Robot Steering rqt plugin which publishes the Twist messages. This is great, but it only executes the Robot Steering rqt plugin to publish the Twist message and then it subscribes to that Twist message and none of the other software is used. So this scenario does not test my Locomotion Node nor my Motor API Service software that I wrote.
So my question is: Am I somehow able and does it make any sense to break the chain of events above at the CAN frames link and simulate just the motor controllers and the motors in the Gazebo sim so I can test the execution of the Robot Steering, Locomotion Node, and Motor API Service? I don't see any Gazebo nor ROS tutorials that show me a means to simulate down at this level of hardware, but maybe I'm just missing something fundamental because I'm so new to this domain.
Will I have to write my own layer of software to simulate the motor controllers and motors to Gazebo? Is there a plugin that I can use that operates at this level, rather than at the Twist Message level?
Thanks in advance for any help or advice you can give.
Post score: 0