Skip to content
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

[ros2] Port tricycle_drive plugin to ros2 #917

Merged
merged 5 commits into from May 29, 2019

Conversation

@shiveshkhaitan
Copy link

commented Apr 6, 2019

Port gazebo_ros_tricycle_drive plugin to ROS2.

Example:

<plugin name='tricycle_drive' filename='libgazebo_ros_tricycle_drive.so'>
  <ros>
    <namespace>/demo</namespace>
    <argument>cmd_vel:=cmd_demo</argument>
    <argument>odom:=odom_demo</argument>
  </ros>

  <!-- wheels -->
  <steering_joint>wheel_front_steer</steering_joint>
  <actuated_wheel_joint>wheel_front_spin</actuated_wheel_joint>
  <encoder_wheel_left_joint>wheel_rear_left_spin</encoder_wheel_left_joint>
  <encoder_wheel_right_joint>wheel_rear_right_spin</encoder_wheel_right_joint>

  <!-- kinematics -->
  <wheel_separation>1.0</wheel_separation>
  <encoder_wheel_diameter>0.3</encoder_wheel_diameter>
  <actuated_wheel_diameter>0.3</actuated_wheel_diameter>

  <!-- limits -->
  <max_wheel_torque>20</max_wheel_torque>
  <max_wheel_acceleration>5.0</max_wheel_acceleration>
  <max_steering_speed>1.0</max_steering_speed>

  <!-- output -->
  <publish_odom>true</publish_odom>
  <publish_wheel_tf>true</publish_wheel_tf>
  <publish_wheel_joint_state>true</publish_wheel_joint_state>

  <odometry_frame>odom_demo</odometry_frame>
  <robot_base_frame>fork</robot_base_frame>

</plugin>

@chapulina chapulina added the ros2 label Apr 8, 2019

@chapulina chapulina self-assigned this Apr 8, 2019

@chapulina

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

Attempt at running CI: Build Status

@shiveshkhaitan

This comment has been minimized.

Copy link
Author

commented May 18, 2019

Probably the test failed because of the required angular velocity set in the test which is not feasible given the current constraints of the model. (Not sure how the test passed initially)

@chapulina

This comment has been minimized.

Copy link
Contributor

commented May 19, 2019

It could also be something else, note that the diff drive test is also failing on this branch (along with many others)

@shiveshkhaitan

This comment has been minimized.

Copy link
Author

commented May 19, 2019

I tried building ros-simulation/gazebo_ros_pkgs branch ros2 and crystal. The tests for diff_drive, force, imu_sensor and joint_state_publisher failed there too. Can it be not because of tricycle_drive and something else?

@chapulina

This comment has been minimized.

Copy link
Contributor

commented May 22, 2019

@shiveshkhaitan , #926 fixed all tests and warnings on the ros2 branch. Once you rebase this PR I can trigger new CI.

Also note the changes made in that PR because you may need some of them here too.

@shiveshkhaitan shiveshkhaitan force-pushed the shiveshkhaitan:tricycle_drive branch from 03412df to 0f33c00 May 22, 2019

@shiveshkhaitan

This comment has been minimized.

Copy link
Author

commented May 22, 2019

The tests seem to pass successfully on my system. What could be the problem?

@chapulina
Copy link
Contributor

left a comment

This is looking great! Mind adding a migration guide to the wiki?

I have several minor comments, most of which have been carried from the ROS 1 implementation. So not really this PR's fault, but this is a good chance to address them nonetheless.

All tests pass locally for me. I only see a couple of deprecation warnings coming from the video plugin, but the tricycle is clean. We should make a new PR to clean up the video warnings. Once you address my comments I can trigger new CI.

gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
gazebo_plugins/src/gazebo_ros_tricycle_drive.cpp Outdated Show resolved Hide resolved
@shiveshkhaitan

This comment has been minimized.

Copy link
Author

commented May 29, 2019

Migration guide is available at ROS 2 Migration: Tricycle drive

@chapulina
Copy link
Contributor

left a comment

Looks great! Merging!

@chapulina chapulina merged commit f634da5 into ros-simulation:ros2 May 29, 2019

1 check failed

Dpr__gazebo_ros_pkgs__ubuntu_bionic_amd64 Build finished.
Details

@shiveshkhaitan shiveshkhaitan deleted the shiveshkhaitan:tricycle_drive branch May 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.