Adding Motors and Sensors to a Model

This tutorial will show how to add sensors and motors to a model to be used with FRCsim

Define Links and Joints

Before adding in any attachments, you must check "enable FRCsim Components" in the Exporter Settings.

Also, the model should first have all of its links and joints defined. A tutorial on how to do this can be found here under the "Define Joints" section: http://wpilib.screenstepslive.com/s/4485/m/23353/l/349026-exporting-a-solidworks-model-to-gazebo. Once those have been defined, open the Manage Robot window.

Add Attachments

Add Attachments

To add an attachment, simply drag the desired type of attachment from the bottom bar onto the link you want to apply it to. If an attachment affects a joint, it will affect the joint between the link it is on and its parent link, and it cannot be put on the base link. Attachments that affect joints are: simple motor, quadrature encoder, potentiometer, internal limit switch, and piston.

Edit Attachment Properties

Edit Attachment Properties

To edit the properties of an attachment, simply click on the desired one in the graph window. A property page will appear on the right side of the window with boxes to edit the various properties for each attachment. The attachment can also be deleted here by pressing the Delete button.

Attachments for joints

Attachments for joints

Some attachment types must be associated with a specific joint chosen from the parent joints of the link it is on. To do so, select the name of the joint in the form ParentJoint-ChildJoint in the dropdown box.

Set the Attachment Position

Set the Attachment Position

For some attachments (rangefinder and camera), you must specify the point on the robot where it is located and a radius/field of view by clicking the "Attachment Pose" button, which opens the Solidworks window where you can select a point on the model.  

To define an attachment's location, click on any vertex or reference point in the physical configuration model (not the collision models).This point will be the location that the attachment is located at.

To define the direction it looks, you can click on any edge or axis and toggle the direction button as necessary, or you can manually specify the rotations to be applied. The rotations are applied in the order of roll, then pitch, then yaw. Once a location and direction are specified a preview will appear showing the view of the attachment. The field of view of the attachment can also be adjusted using the slider.

List of currently supported attachments

The currently supported attachments, their properties, their units, and other details are shown in the table below. Note: Any joint attachment applied to a joint with more than one axis of movement will only effect the first axis of the joint.

 

List of currently supported attachments

Video Tutorial

A video on tuning motors in Gazebo can be found here:

https://www.youtube.com/playlist?list=PL9HqYJ1IkIKW21ULeI4mUjaj0UIzRJhWf

0 Report Errors

Use this form to report any errors with the documentation. For help with WPILib, please use the FIRST Forums at http://forums.usfirst.org For reporting WPILib bugs, please submit an issue on GitHub at https://github.com/wpilibsuite/allwpilib/issues/new

Ignore