-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wheel lights #21
Comments
After looking at it some more, I noticed function void RobotMonitor::robotMonitorTask() in RobotMonitor.cpp. This function appears to be called continuously and sets the wheel lights based on the robot state. Seems that this is overwriting my command almost immediately. I'll look into a way to toggle the lights between the default behavior and manual command mode. |
Maybe the way to do it is to have the service call something in RobotMonitor to set the desired wheel light state, or to disable/enable RobotMonitor's wheel light code. RobotMonitor also puts a popup dialog box in MobileEyes when the robot is e-stopped which gives you a button to re-enable the motors, though in ROS you could also use the enable motors service. The intention for RobotMonitor is to (depending on requirements from users) potentially be a starting point for more sophisticated API for customizing responses to various robot events or state changes that could happen alongside "normal" operation... so any ideas would be appreciated. The RobotMonitor in rosarnl and rosaria are just copies of the same class in the ARNL example server, but if it seems like it has a stable API/design it will be moved into the ARIA library itself. |
I think I'll need to control the lights via ros-arnl, since the robot and environment states that we want to signal are only visible on the client side. I'm thinking:
|
That sounds pretty good. The wheel light states are enumerated by an 8-bit value, then some of the states also look at two other bytes in the command for additional info to modulate color or speed or whatever. There is no state for 0 so that could mean "default" (let RobotMonitor do it) in the service call or topic that changes it. Or use a signed int and use -1 for default (or a signed char, there aren't and won't be more than a dozen possible states.) That could make the interface simpler. Note that this stuff will only apply to the LX at this point. See the robot manual for a list of the states. Alternatively, we could let RobotMonitor override the state requested by the client in its few cases (e-stop and motors (still) disabled.) |
I've gotten it working along those lines, with 0 indicating the default behavior. The service definition includes constants to make it user friendly. If you want, I can make a pull request once #19 is dispositioned.
|
I'm working on a feature to control the Pioneer wheel lights. Here's my service callback. It's based on the Aria example mtxWheelLights.cpp
When I call the service, the wheel lights will flash the commanded mode for an instant, then go back to Ready mode. Is there something else I need to do to make the command stick?
The text was updated successfully, but these errors were encountered: