This is a driver to communicate with STorM32 gimbal controllers.
You MUST configure your gimbal with the Windows app before using this package.
This package has been tested on ROS Kinetic Kame on Ubuntu 16.04.
You must clone this repository as storm32_gimbal
into your catkin workspace:
git clone https://github.com/mcgill-robotics/ros-storm32-gimbal storm32_gimbal
Before proceeding, make sure to install all dependencies by running:
rosdep update
rosdep install storm32_gimbal
You must compile this package before being able to run it. You can do so by running:
catkin_make
from the root of your catkin
workspace.
To run, simply launch the storm32_node.py
node as such:
rosrun storm32_gimbal storm32_node.py
You can change the port and TF frame ID by passing them as parameters
rosrun storm32_gimbal storm32_node.py port:=<device_path> frame:=<frame_name>
A sample launch file is available in the launch
directory.
All orientations used by this package are relative to a global reference frame
called gimbal_ref
. This reference frame is attached to the gimbal, and has a
z axis always pointing away from the center of the earth (i.e. it does not
pitch or roll, but can yaw).
This package publishes to two topics:
~camera_orientation
: The IMU1 readings as aQuaternionStamped
message (i.e. the orientation of the gimballed link relative to the globalgimbal_ref
frame). Since the link is stabilized, this should always be approximately the target orientation of the gimbal.~controller_orientation
: The IMU2 readings as aQuaternionStamped
message (i.e. the orientation of the STorM32 board relative to the globalgimbal_ref
frame). This should represent the orientation of the gimbal and is not stabilized.
You can also set a new target orientation relative to the gimbal_ref
frame by
publishing a GimbalOrientation
message to the ~target_orientation
topic.
The orientation
field is expected to be relative to the gimbal_ref
frame,
and the unlimited
field defines whether the controller should attempt to
limit its rotation to hard set limits on the STorM32 controller.
Contributions are welcome. Simply open an issue or pull request on the matter, and it will be accepted as long as it does not complicate the code base too much.
As for style guides, we follow the ROS Python Style Guide for ROS-specifics and the Google Python Style Guide for everything else.
We use YAPF for all Python formatting needs. You can auto-format your changes with the following command:
yapf --recursive --in-place --parallel .
We also use catkin_lint for all catkin
specifics. You can lint your changes as follows:
catkin lint --explain -W2 .
See LICENSE.