Coder Social home page Coder Social logo

swerve-teleop-simulation's Introduction

swerve-teleop-simulation

Here we are moving swerve drive using teleop in simulation using swerve_steering_controller.

You can find some info about the controller here.

Steps to implement teleop in simulation -

  1. You need Ubuntu 20.04 and ros noetic.

  2. Download ros_controllers package from here from noetic-devel branch because this controller is developed in ros-noetic. Solve catkin_make errors (if any).

  3. Create your own urdf. I have added a custom made urdf 'swerve_description' in this repository and also added whole cad in .stl format. I extracted that urdf from Autodesk Fusion360. Add your package in same workspace in which you have downloded ros_controller package.

  4. Add robotNamespace and robotSimType parameters in gazebo_ros_control plugin (if not present)

      <gazebo>
        <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
          <robotNamespace>/</robotNamespace>
          <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
        </plugin>
      </gazebo>
    
  5. Add following gazebo plugin

      <gazebo>
        <plugin name="ground_truth" filename="libgazebo_ros_p3d.so">
          <alwaysOn>true</alwaysOn>
          <updateRate>50.0</updateRate>
          <gaussianNoise>0.01</gaussianNoise>
          <bodyName>base_footprint</bodyName>
          <topicName>odomw</topicName>
        </plugin>
      <gazebo>
    
  6. Now inside urdf check the transmissions. The hardwareInterface parameter inside joint of wheels should be VelocityJointInterface and for holders it should be PositionJointInterface.

    e.g. for wheel's joint

     <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
    

    for holder's joint

     <hardwareInterface>hardware_interface/PositionJointInterface</hardwareInterface>
    

    If you are having any doubt, check our swerve.trans file.

  7. Make the changes in launch file 'robot.launch' inside swerve_steering_controller/test/launch according to your urdf. We have added our robot.launch file too.

  8. Change the parameters in 'ros_controllers.yaml' inside swerve_steering_controller/test/config. We have added that file too.

  9. Now you are ready to launch 'robot.launch' from swerve_steering_controller/test/launch.

  10. In order to run teleop_twist_keyboard you need to change topic name inside teleop_twist_keyboard.py from 'cmd_vel' to 'swerve_steering_controller/cmd_vel'. We have done that and added teleop_twist_keyboard.py file here.

  11. Now, first launch 'robot.launch' then run 'teleop_twist_keyboard.py' and you can see your swerve drive moving.

The video recording of our execution is available here.

swerve-teleop-simulation's People

Contributors

avdhootu27 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

idincern

swerve-teleop-simulation's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.