Skip to content

ROS2 Setup to perform MPC based Holonomic Navigation for Robotics: Planning and Navigation Course (EC4.403) at IIITH

Notifications You must be signed in to change notification settings

soham2560/MPCHoloNavigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPCHoloNavigation

ROS2 Setup to perform MPC based Holonomic Navigation for Robotics: Planning and Navigation Course (EC4.403) at IIITH

Table of contents

Development Setup

  • To pull latest docker image

    docker pull ghcr.io/soham2560/humble-garden:latest
  • To start container

    • Open Command Pallete with Ctrl+Shift+P
    • Select Option to Rebuild and Reopen Container

    Action Buttons

    We use the VSCode Action Button Extension to facilitate development. They are not necessary but certainly do help. To access these buttons you may need to enable it through the Extensions Tab in VSCode, though the extension should download automatically on container startup. The available buttons are as follows:

    • Build

      Builds the workspace packages upto robot_bringup

      colcon build --symlink-install --packages-up-to robot_bringup
    • Import Libs

      Uses vcstool to import the repositories listed in dep.repos

      rm -rf /ros2_ws/src/dep_repos && mkdir -p /ros2_ws/src/dep_repos && vcs import /ros2_ws/src/dep_repos < /ros2_ws/src/dep.repos

    Note: Remember to use Import Libs on every fresh container startup (not necessary on reopen)

Hardware Setup

Information about the Hardware Setup can be found here

How to Use

  • Build and Source the workspace

    It is suggested to use the Action Buttons to build, but if you're unable due to some reason, you can use the commands below

    colcon build --symlink-install --packages-up-to robot_bringup
    source install/setup.bash

    Note: Ensure you've run Import Libs atleast once (or the equivalent command)

  • WiCAN Setup (⚠️ Deprecated: Look at USB2CAN below)

    sudo slcand -o -s8 -t sw -S 3000000 /dev/ttyUSB0 can0
    sudo ifconfig can0 txqueuelen 1000
    sudo ifconfig can0 up

    Note: You need to change ttyUSB0 to the WiCAN device

  • To setup USB2CAN (only if working on hardware)

    NOTE: This is to be on host (NOT in container), it is a one time process and won't have to be repeated again

    cd scripts
    chmod +x usb2can_udev.sh
    ./usb2can_udev.sh
  • Launch

    ros2 launch robot_bringup robot_bringup.launch.py use_rviz:=True use_slamtoolbox:=True use_nav2:=True use_sim_time:=False use_joy:=True

    Available arguments are as follows:

    Argument Default Value Description
    use_sim_time False Launch in simulation mode (True for simulation, False for hardware connection).
    namespace "" (empty) Namespace for the launched nodes.
    record False Enable recording to a rosbag.
    use_rviz False Launch RViz on startup.
    use_joy False Use joystick control.
    use_slamtoolbox False Launch SLAM Toolbox on startup
    use_nav2 False Launch Nav2 on startup

Individual Launching (⚠️ Deprecated: Look at Launch Args of main launch)

  • LIDAR Launch
  ros2 launch ld08_driver ld08.launch.py
  • SLAM-toolbox
  ros2 launch robot_bringup online_async_launch.py
  • NAV2

    ros2 launch robot_bringup navigation_launch.py
  • Interact

    To interact with the drive, you can use the teleop_twist_keyboard node by launching it as follows

    ros2 run teleop_twist_keyboard teleop_twist_keyboard

    or make the arg use_joy:=True while launching when you have a Joystick Controller connected

Note: The README's in this repository are inspired by this

About

ROS2 Setup to perform MPC based Holonomic Navigation for Robotics: Planning and Navigation Course (EC4.403) at IIITH

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •