{"action":"created","issue":{"url":"https://api.github.com/repos/mavlink/mavros/issues/384","labels_url":"https://api.github.com/repos/mavlink/mavros/issues/384/labels{/name}","comments_url":"https://api.github.com/repos/mavlink/mavros/issues/384/comments","events_url":"https://api.github.com/repos/mavlink/mavros/issues/384/events","html_url":"https://github.com/mavlink/mavros/issues/384","id":105370767,"number":384,"title":"Is the velocity controller in this package and Pixhawk (stable version) same ?","user":{"login":"weiweikong","id":2463397,"avatar_url":"https://avatars.githubusercontent.com/u/2463397?v=3","gravatar_id":"","url":"https://api.github.com/users/weiweikong","html_url":"https://github.com/weiweikong","followers_url":"https://api.github.com/users/weiweikong/followers","following_url":"https://api.github.com/users/weiweikong/following{/other_user}","gists_url":"https://api.github.com/users/weiweikong/gists{/gist_id}","starred_url":"https://api.github.com/users/weiweikong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weiweikong/subscriptions","organizations_url":"https://api.github.com/users/weiweikong/orgs","repos_url":"https://api.github.com/users/weiweikong/repos","events_url":"https://api.github.com/users/weiweikong/events{/privacy}","received_events_url":"https://api.github.com/users/weiweikong/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mavlink/mavros/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/mavlink/mavros/labels/tests","name":"tests","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-08T12:32:35Z","updated_at":"2015-09-08T14:18:02Z","closed_at":null,"body":"Hi, \r\n  I tested `iris_empty_world_offboard_ctl.launch` successfully with position control and velocity control under Gazebo in OFFBOARD mode. But it was failed when I try to test the **velocity control** under OFFBOARD mode with Pixhawk HIL setup. \r\n\r\n  My HIL setup is as follows\r\n- jMAVsim\r\n- Qgroundcontrol\r\n- Pixhawk with current stable firmware\r\n\r\nI modified the `base_node.launch` as follows\r\n```\r\n<launch>\r\n\t<!-- vim: set ft=xml noet : -->\r\n\t<!-- Base node launch file-->\r\n    <arg name=\"args\" value=\"offboard_control\"/>    <!-- offboard ctl test -->\r\n\t<arg name=\"num_of_tests\" default=\"1\" />  <!-- number of repetitions of the same test -->\r\n    <arg name=\"rate\" default=\"10.0\" />      <!-- loop rate of tests -->\r\n    <arg name=\"use_pid\" default=\"true\" />     <!-- use default PID velocity control -->\r\n\r\n\t\r\n\t<arg name=\"mode\" default=\"position\" />     <!-- position ctl mode -->\r\n    <arg name=\"shape\" default=\"square\" />     <!-- square shaped path -->\r\n\r\n    <!-- if use_pid is set, PID values should be configured -->\r\n    <arg name=\"linvel_p_gain\" default=\"0.4\" />     <!-- Proportional gain for linear velocity -->\r\n    <arg name=\"linvel_i_gain\" default=\"0.05\" />     <!-- Integral gain for linear velocity -->\r\n    <arg name=\"linvel_d_gain\" default=\"0.12\" />     <!-- Derivative gain for linear velocity -->\r\n    <arg name=\"linvel_i_max\" default=\"0.1\" />     <!-- Max integral windup for linear velocity -->\r\n    <arg name=\"linvel_i_min\" default=\"-0.1\" />     <!-- Min integral windup for linear velocity -->\r\n\r\n    <arg name=\"yawrate_p_gain\" default=\"0.011\" />     <!-- Proportional gain for yaw rate -->\r\n    <arg name=\"yawrate_i_gain\" default=\"0.00058\" />     <!-- Integral gain for yaw rate -->\r\n    <arg name=\"yawrate_d_gain\" default=\"0.12\" />     <!-- Derivative gain for yaw rate -->\r\n    <arg name=\"yawrate_i_max\" default=\"0.005\" />     <!-- Max integral windup for yaw rate -->\r\n    <arg name=\"yawrate_i_min\" default=\"-0.005\" />     <!-- Min integral windup for yaw rate -->\r\n\r\n\r\n\t<node pkg=\"test_mavros\" type=\"sitl_test_node\" args=\"$(arg args)\" name=\"sitl_test_offboard_ctl\" required=\"true\" clear_params=\"true\" output=\"screen\">\r\n\t\t<param name=\"num_of_tests\" value=\"$(arg num_of_tests)\" />\r\n\t\t<param name=\"rate\" value=\"$(arg rate)\" />\r\n\t\t<param name=\"use_pid\" value=\"$(arg use_pid)\" />\r\n\r\n\t\t<param name=\"mode\" value=\"$(arg mode)\" />\r\n\t\t<param name=\"shape\" value=\"$(arg shape)\" />\r\n\r\n\t\t<param name=\"linvel_p_gain\" value=\"$(arg linvel_p_gain)\" />\r\n\t\t<param name=\"linvel_i_gain\" value=\"$(arg linvel_i_gain)\" />\r\n\t\t<param name=\"linvel_d_gain\" value=\"$(arg linvel_d_gain)\" />\r\n\t\t<param name=\"linvel_i_max\" value=\"$(arg linvel_i_max)\" />\r\n\t\t<param name=\"linvel_i_min\" value=\"$(arg linvel_i_min)\" />\r\n\r\n\t\t<param name=\"yawrate_p_gain\" value=\"$(arg yawrate_p_gain)\" />\r\n\t\t<param name=\"yawrate_i_gain\" value=\"$(arg yawrate_i_gain)\" />\r\n\t\t<param name=\"yawrate_d_gain\" value=\"$(arg yawrate_d_gain)\" />\r\n\t\t<param name=\"yawrate_i_max\" value=\"$(arg yawrate_i_max)\" />\r\n\t\t<param name=\"yawrate_i_min\" value=\"$(arg yawrate_i_min)\" />\r\n\t</node>\r\n\r\n</launch>\r\n```\r\nthen I run\r\n- `roslaunch base_node.launch mode:=position shape:=circle`, the quadrotor worked well.\r\n- `roslaunch base_node.launch mode:=velocity shape:=circle`, the quadrotor flied randomly near the point before I switched the mode to OFFBOARD. But, the system send the OFFBOARD data steam correctly by checking `rostopic echo /mavros/setpoint_velocity/cmd_vel`.\r\n\r\nSo is the velocity controller in this package different from the one in Pixhawk?"},"comment":{"url":"https://api.github.com/repos/mavlink/mavros/issues/comments/138574866","html_url":"https://github.com/mavlink/mavros/issues/384#issuecomment-138574866","issue_url":"https://api.github.com/repos/mavlink/mavros/issues/384","id":138574866,"user":{"login":"weiweikong","id":2463397,"avatar_url":"https://avatars.githubusercontent.com/u/2463397?v=3","gravatar_id":"","url":"https://api.github.com/users/weiweikong","html_url":"https://github.com/weiweikong","followers_url":"https://api.github.com/users/weiweikong/followers","following_url":"https://api.github.com/users/weiweikong/following{/other_user}","gists_url":"https://api.github.com/users/weiweikong/gists{/gist_id}","starred_url":"https://api.github.com/users/weiweikong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weiweikong/subscriptions","organizations_url":"https://api.github.com/users/weiweikong/orgs","repos_url":"https://api.github.com/users/weiweikong/repos","events_url":"https://api.github.com/users/weiweikong/events{/privacy}","received_events_url":"https://api.github.com/users/weiweikong/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T14:18:02Z","updated_at":"2015-09-08T14:18:02Z","body":"- The setpoints could be generate through the node `sitl_test_node` due to the `iris_empty_world_offboard_ctl.launch` and `base_node.launch`.\r\n- I could run HIL with jMAVsim and switch to OFFBOARD position control, but failed to OFFBOARD velocity control\r\n- I am now checking the controller of  ROS SITL and HIL.\r\n- I'd like to test POSIX SITL later and report the results."}}