ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Most ROS nodes (the nav stack, most teleop nodes, etc) assume that you use twist messages to control the base. Twists are general enough to describe almost any base motion, and usually we're using gazebo to debug higher level problems. If you get lower level than that, you might start having to tweak gazebo quite a bit to get friction coefficients correct, get inertia matrices just right, etc.

That being said, if you want to do simulation of the individual wheels, it shouldn't be too hard to modify the diff drive plugin to do what you want. Start with this file: https://github.com/ros-simulation/gazebo_ros_pkgs/blob/hydro-devel/gazebo_plugins/src/gazebo_ros_diff_drive.cpp

Overview of the changes you'll need to make: -subscribe to your CAN API messages instead of the cmd_vel on line 227 -modify the cmdVelCallback to be canMsgCallback and to expect the right messages -modify UpdateChild() to apply the individual wheel velocities to the left and right wheels

Most ROS nodes (the nav stack, most teleop nodes, etc) assume that you use twist messages to control the base. Twists are general enough to describe almost any base motion, and usually we're using gazebo to debug higher level problems. If you get lower level than that, you might start having to tweak gazebo quite a bit to get friction coefficients correct, get inertia matrices just right, etc.

That being said, if you want to do simulation of the individual wheels, it shouldn't be too hard to modify the diff drive plugin to do what you want. Start with this file: https://github.com/ros-simulation/gazebo_ros_pkgs/blob/hydro-devel/gazebo_plugins/src/gazebo_ros_diff_drive.cpp

Overview of the changes you'll need to make: -subscribe * subscribe to your CAN API messages instead of the cmd_vel on line 227 -modify * modify the cmdVelCallback to be canMsgCallback and to expect the right messages -modify * modify UpdateChild() to apply the individual wheel velocities to the left and right wheels