acowley / roshask

Haskell client library for the ROS robotics framework.
BSD 3-Clause "New" or "Revised" License
107 stars 18 forks source link

Services code review 1 #22

Closed rgleichman closed 9 years ago

rgleichman commented 10 years ago

I have been working on implementing services and thought it would be nice to get some feedback. This is still a work in progress, so this should not be merged.

Check out the new tests in Tests/MsgGen.hs, and Tests/ServiceClientTests/ServiceClientTest.hs (instructions in comments). Right now it can generate Haskell types for service messages (tested by MsgGen), and call ROS services without any error handling (tested by ServiceClientTest).

Service message generation is not yet integrated into the executable.

Service Haskell types are just like message types except that they are also instances of SrvInfo. The generated Haskell message type files should be the same as before except they might have an extra newline at the end.

Except for MsgGen, changes to existing code are minimal: there is some code extraction and changes suggested by hlint.

rgleichman commented 10 years ago

The Travis build fails since ServiceClientTest (servicetest test suite) needs manual set up.

rgleichman commented 10 years ago

Since making the pull request I have added error detection and exception handling to callService.

acowley commented 10 years ago

This is an outstanding job! It's really great that not only will this add a really useful feature, but I think it's forcing improvements through the existing code you've had to touch.

rgleichman commented 10 years ago

The previous two commits should address the remaining comments.