{"action":"created","issue":{"url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/336","repository_url":"https://api.github.com/repos/ros-controls/ros_controllers","labels_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/336/labels{/name}","comments_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/336/comments","events_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/336/events","html_url":"https://github.com/ros-controls/ros_controllers/pull/336","id":316867367,"number":336,"title":"fix test","user":{"login":"k-okada","id":493276,"avatar_url":"https://avatars0.githubusercontent.com/u/493276?v=4","gravatar_id":"","url":"https://api.github.com/users/k-okada","html_url":"https://github.com/k-okada","followers_url":"https://api.github.com/users/k-okada/followers","following_url":"https://api.github.com/users/k-okada/following{/other_user}","gists_url":"https://api.github.com/users/k-okada/gists{/gist_id}","starred_url":"https://api.github.com/users/k-okada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k-okada/subscriptions","organizations_url":"https://api.github.com/users/k-okada/orgs","repos_url":"https://api.github.com/users/k-okada/repos","events_url":"https://api.github.com/users/k-okada/events{/privacy}","received_events_url":"https://api.github.com/users/k-okada/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-23T15:36:31Z","updated_at":"2018-04-28T05:54:33Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/ros-controls/ros_controllers/pulls/336","html_url":"https://github.com/ros-controls/ros_controllers/pull/336","diff_url":"https://github.com/ros-controls/ros_controllers/pull/336.diff","patch_url":"https://github.com/ros-controls/ros_controllers/pull/336.patch"},"body":"As discussed in https://github.com/ros-controls/ros_controllers/pull/327#issuecomment-383351311, the test code in `ros_control` is sometimes unstable. I have found several reason and hope this solves some of the test issues (I know, this is not a perfect, joint_trajectory_controller_vel_test still sometimes failing)\n\n1. diff_drive_controller: isPublishngCmdVelOut somtimes retunes before it actually catch `cmd_vel`, in this PR, i added the code to check getNumPublisheres until timeouts.\n\n2. joint_trajectory_controller_stopramp.test: waits `waitForStates` but it dones not gurantee if new stateCB is called aster the states is actually changed. I have added waitForNextStates function that wait for 1 more messages."},"comment":{"url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/comments/385143370","html_url":"https://github.com/ros-controls/ros_controllers/pull/336#issuecomment-385143370","issue_url":"https://api.github.com/repos/ros-controls/ros_controllers/issues/336","id":385143370,"user":{"login":"7675t","id":25698961,"avatar_url":"https://avatars2.githubusercontent.com/u/25698961?v=4","gravatar_id":"","url":"https://api.github.com/users/7675t","html_url":"https://github.com/7675t","followers_url":"https://api.github.com/users/7675t/followers","following_url":"https://api.github.com/users/7675t/following{/other_user}","gists_url":"https://api.github.com/users/7675t/gists{/gist_id}","starred_url":"https://api.github.com/users/7675t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/7675t/subscriptions","organizations_url":"https://api.github.com/users/7675t/orgs","repos_url":"https://api.github.com/users/7675t/repos","events_url":"https://api.github.com/users/7675t/events{/privacy}","received_events_url":"https://api.github.com/users/7675t/received_events","type":"User","site_admin":false},"created_at":"2018-04-28T05:54:33Z","updated_at":"2018-04-28T05:54:33Z","author_association":"NONE","body":"No, I'm afraid we still have same problem. Yes, using your script, I don't get any failure, but the situation is different from actual test procedure. I can easily get failure by doing catkin_run_tests several times:\r\n\r\n```\r\n$ catkin run_tests joint_trajectory_controller | tee log.txt | grep FAILURES\r\n```\r\n\r\nand the failure comes from `ignoreOldTopicTraj` as:\r\n```\r\n[joint_trajectory_controller.rosunit-joint_trajectory_controller_vel_test/ignore\r\nOldTopicTraj][FAILURE]\r\n/home/tajima/Codes/aisinaw_ws/src/ros_controllers/joint_trajectory_controller/te\r\nst/joint_trajectory_controller_test.cpp:1082\r\nThe difference between traj.points.back().positions[i] and state->desired.positi\r\nons[i] is 1.5707913851769366, which exceeds EPS, where\r\ntraj.points.back().positions[i] evaluates to -0.78539816339744828,\r\nstate->desired.positions[i] evaluates to 0.78539322177948834, and\r\nEPS evaluates to 0.01.\r\n--------------------------------------------------------------------------------\r\n\r\n\r\n[joint_trajectory_controller.rosunit-joint_trajectory_controller_vel_test/ignore\r\nOldTopicTraj][FAILURE]\r\n/home/tajima/Codes/aisinaw_ws/src/ros_controllers/joint_trajectory_controller/te\r\nst/joint_trajectory_controller_test.cpp:1082\r\nThe difference between traj.points.back().positions[i] and state->desired.positi\r\nons[i] is 0.7853981633974485, which exceeds EPS, where\r\ntraj.points.back().positions[i] evaluates to 0.78539816339744828,\r\nstate->desired.positions[i] evaluates to -2.3436235419703889e-16, and\r\nEPS evaluates to 0.01.\r\n--------------------------------------------------------------------------------\r\n```\r\nAnd I'm doing always `catkin run_tests joint_trajectory_controller` so I believe the test program is updated (And I do `catkin clean` when I get new branch`.)\r\n\r\n@k-okada \r\nPlease check with `catkin run_tests joint_trajectory_controller` if you can reproduce the failure.\r\n\r\nAnd I think the failure comes from that the test code expects the controller start to follow the trajectory immediately, while it is not guaranteed. So it is not guaranteed the trajectory ends after sleeping the trajectory duration. I believe that why actionlib were introduced instead of the simple toppic framework.\r\n\r\n\r\n"}}
{"actor":{"display_login":"7675t"}}