microsat / ROSRobotControl

A ROS node to run on a DFRobot Romeo to control motors and publish sensor information.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ROSRomeoNode

This is an Arduino proejct for a DFRobot Romeo that implements a ROS Node using rosserial_arduino to publish encoder and sensor values and subscribe to desired motor speeds.

Node API

This node uses motor control commands to set the speeds of two motors. In addition, it monitors encoders for the two motors and published their counts and rates.

To prevent a ROS node crash or communication problem from causing a runaway robot, the node will stop the robot if no new motor command is received within a timeout threshold.

Published Topics

lwheel (Int16)

Left wheel encoder value

rwheel (Int16)

Right wheel encoder value

lwheel_velocity (Float32)

Left wheel speed in meters per second.

rwheel_velocity (Float32)

Right wheel speed in encoder ticks per second.

Subscribed Topics

lwheel_vtarget (Float32)

Left wheel target speed in meters per second.

rwheel_vtarget (Float32)

Right wheel target speed in meters per second.

Parameters

ticks_meter (Int16, default 50)

The number of encoder ticks per meter. A global parameter since it will be used by more than one node.

~control_rate (Int16, default 50)

The rate at which the motors are updated, in Hz.

~vtarget_timeout (Float32, default 2.0)

Maximum time, in seconds, from the last velocity target command. If no command is received within this timeout, the node assumes the controller node has crashed, and sets the motor speeds to zero.

Kp (Float32, default 1.0)

Proportional control parameter.

Ki (Float32, default 0.0)

Integral control parameter.

Kd (Float32, default 0.0)

Derivative control parameter.

About

A ROS node to run on a DFRobot Romeo to control motors and publish sensor information.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Arduino 100.0%