{"action":"created","issue":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3643","repository_url":"https://api.github.com/repos/RobotLocomotion/drake","labels_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3643/labels{/name}","comments_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3643/comments","events_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3643/events","html_url":"https://github.com/RobotLocomotion/drake/pull/3643","id":180511166,"number":3643,"title":"Adds an LCM Mocking Framework","user":{"login":"liangfok","id":1388098,"avatar_url":"https://avatars.githubusercontent.com/u/1388098?v=3","gravatar_id":"","url":"https://api.github.com/users/liangfok","html_url":"https://github.com/liangfok","followers_url":"https://api.github.com/users/liangfok/followers","following_url":"https://api.github.com/users/liangfok/following{/other_user}","gists_url":"https://api.github.com/users/liangfok/gists{/gist_id}","starred_url":"https://api.github.com/users/liangfok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liangfok/subscriptions","organizations_url":"https://api.github.com/users/liangfok/orgs","repos_url":"https://api.github.com/users/liangfok/repos","events_url":"https://api.github.com/users/liangfok/events{/privacy}","received_events_url":"https://api.github.com/users/liangfok/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RobotLocomotion/drake/labels/priority:%20high","name":"priority: high","color":"b60205"},{"url":"https://api.github.com/repos/RobotLocomotion/drake/labels/team:%20software%20core","name":"team: software core","color":"0052cc"},{"url":"https://api.github.com/repos/RobotLocomotion/drake/labels/type:%20feature%20request","name":"type: feature request","color":"0e8a16"}],"state":"open","locked":false,"assignee":{"login":"jwnimmer-tri","id":17596505,"avatar_url":"https://avatars.githubusercontent.com/u/17596505?v=3","gravatar_id":"","url":"https://api.github.com/users/jwnimmer-tri","html_url":"https://github.com/jwnimmer-tri","followers_url":"https://api.github.com/users/jwnimmer-tri/followers","following_url":"https://api.github.com/users/jwnimmer-tri/following{/other_user}","gists_url":"https://api.github.com/users/jwnimmer-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/jwnimmer-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwnimmer-tri/subscriptions","organizations_url":"https://api.github.com/users/jwnimmer-tri/orgs","repos_url":"https://api.github.com/users/jwnimmer-tri/repos","events_url":"https://api.github.com/users/jwnimmer-tri/events{/privacy}","received_events_url":"https://api.github.com/users/jwnimmer-tri/received_events","type":"User","site_admin":false},"assignees":[{"login":"david-german-tri","id":17437069,"avatar_url":"https://avatars.githubusercontent.com/u/17437069?v=3","gravatar_id":"","url":"https://api.github.com/users/david-german-tri","html_url":"https://github.com/david-german-tri","followers_url":"https://api.github.com/users/david-german-tri/followers","following_url":"https://api.github.com/users/david-german-tri/following{/other_user}","gists_url":"https://api.github.com/users/david-german-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/david-german-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-german-tri/subscriptions","organizations_url":"https://api.github.com/users/david-german-tri/orgs","repos_url":"https://api.github.com/users/david-german-tri/repos","events_url":"https://api.github.com/users/david-german-tri/events{/privacy}","received_events_url":"https://api.github.com/users/david-german-tri/received_events","type":"User","site_admin":false},{"login":"jwnimmer-tri","id":17596505,"avatar_url":"https://avatars.githubusercontent.com/u/17596505?v=3","gravatar_id":"","url":"https://api.github.com/users/jwnimmer-tri","html_url":"https://github.com/jwnimmer-tri","followers_url":"https://api.github.com/users/jwnimmer-tri/followers","following_url":"https://api.github.com/users/jwnimmer-tri/following{/other_user}","gists_url":"https://api.github.com/users/jwnimmer-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/jwnimmer-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwnimmer-tri/subscriptions","organizations_url":"https://api.github.com/users/jwnimmer-tri/orgs","repos_url":"https://api.github.com/users/jwnimmer-tri/repos","events_url":"https://api.github.com/users/jwnimmer-tri/events{/privacy}","received_events_url":"https://api.github.com/users/jwnimmer-tri/received_events","type":"User","site_admin":false}],"milestone":null,"comments":57,"created_at":"2016-10-02T13:00:13Z","updated_at":"2016-10-07T18:47:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RobotLocomotion/drake/pulls/3643","html_url":"https://github.com/RobotLocomotion/drake/pull/3643","diff_url":"https://github.com/RobotLocomotion/drake/pull/3643.diff","patch_url":"https://github.com/RobotLocomotion/drake/pull/3643.patch"},"body":"# Motivation\r\n\r\nWhen unit testing, it is often useful to replace the actual LCM instance with a mocked version of it. By not actually sending packets over the network, unit tests will be more reliable.\r\n\r\nResolves #3546.\r\n\r\n# Recommended Plan For Reviewing this PR\r\n\r\nFirst look at the files in `drake/lcm/`. Specifically start with `drake_lcm_interface.h`, which defines the top-level pure virtual class for the LCM mocking framework. Then look at its child classes: `drake_lcm.h`, which is encapsulates the _real_ LCM instance, and `drake_mock_lcm.h`, which encapsulates a _mock_ lcm interface.\r\n\r\nSecond look at the files in `drake/systems/lcm/`, which were updated to use the new LCM mock framework that was just reviewed.\r\n\r\nFinally, look at the files in `drake/automotive/` and `drake/systems/plants/rigid_body_plant`, which were modified to use the new LCM mock framework and the updated LCM System 2.0 systems.\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/robotlocomotion/drake/3643)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/comments/252331048","html_url":"https://github.com/RobotLocomotion/drake/pull/3643#issuecomment-252331048","issue_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/3643","id":252331048,"user":{"login":"david-german-tri","id":17437069,"avatar_url":"https://avatars.githubusercontent.com/u/17437069?v=3","gravatar_id":"","url":"https://api.github.com/users/david-german-tri","html_url":"https://github.com/david-german-tri","followers_url":"https://api.github.com/users/david-german-tri/followers","following_url":"https://api.github.com/users/david-german-tri/following{/other_user}","gists_url":"https://api.github.com/users/david-german-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/david-german-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-german-tri/subscriptions","organizations_url":"https://api.github.com/users/david-german-tri/orgs","repos_url":"https://api.github.com/users/david-german-tri/repos","events_url":"https://api.github.com/users/david-german-tri/events{/privacy}","received_events_url":"https://api.github.com/users/david-german-tri/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T18:47:14Z","updated_at":"2016-10-07T18:47:14Z","body":"\n\n\n\nReview status: all files reviewed at latest revision, 2 unresolved discussions.\n\n---\n\n*[drake/lcm/drake_mock_lcm.h, line 67 at r19](https://reviewable.io:443/reviews/robotlocomotion/drake/3643#-KTQp3OspLbFiI8Uweil:-KTVSQbRNKygGh7o-pbp:bdkyfwb) ([raw file](https://github.com/robotlocomotion/drake/blob/56580e3fdad173308cec263107ebd1b38ffd4dd7/drake/lcm/drake_mock_lcm.h#L67)):*\n<details><summary><i>Previously, liangfok (Chien-Liang Fok) wrote…</i></summary>\n> I'd like to decouple the side-effects of `Publish()` from the side-effects of `Subscribe()` to enable finer-grained unit testing. I believe this decoupling results in less brittle unit tests.\n</details>\nOK.  I'm a little skeptical that's true, but you're the author and it isn't a defect.\n\n---\n\n*[drake/systems/plants/rigid_body_plant/test/rigid_body_tree_lcm_publisher_test.cc, line 463 at r19](https://reviewable.io:443/reviews/robotlocomotion/drake/3643#-KTQr68JnJhfzUFld8a-:-KTVSiJj69OS77SP1jR2:b-mboo1i) ([raw file](https://github.com/robotlocomotion/drake/blob/56580e3fdad173308cec263107ebd1b38ffd4dd7/drake/systems/plants/rigid_body_plant/test/rigid_body_tree_lcm_publisher_test.cc#L463)):*\n<details><summary><i>Previously, liangfok (Chien-Liang Fok) wrote…</i></summary>\n> Please clarify? There are some assertions like `EXPECT_EQ()` below.\n</details>\nI meant, assert that the messages showed up on the mock, instead of using the get_load_message and get_draw_message_bytes escape hatches.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/robotlocomotion/drake/3643)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"david-german-tri"}}