https://github.com/Yerbert/DingoQuadruped Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. {{ message }} Yerbert / DingoQuadruped Public forked from stanfordroboticsclub/StanfordQuadruped * Notifications * Fork 437 * Star 445 Base code for the Dingo quadruped; modified from Stanford Pupper and Notspot repositories. Includes integration with ROS Noetic and a simulation of the Dingo 445 stars 437 forks Star Notifications * Code * Pull requests 1 * Actions * Projects 0 * Security * Insights More * Code * Pull requests * Actions * Projects * Security * Insights Yerbert/DingoQuadruped This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 2 branches 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/Y] Use Git or checkout with SVN using the web URL. [gh repo clone Yerber] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. This branch is 128 commits ahead of stanfordroboticsclub:master. #7 Latest commit @nathanfergy nathanfergy Added BOM ... 1c26373 Jun 8, 2023 Added BOM 1c26373 Git stats * 187 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .ipynb_checkpoints .vscode assets dingo_nano dingo_ws .devcontainer.json .gitignore Dingo Robot Bill of Materials.xlsx Docker-compose.yaml Dockerfile README.md ROSpackageinfo.md Testing notebook.ipynb dingo.repos imu_test.py list.txt motorTest.py my_list.txt ros_entrypoint.sh servoDefinition.py View code [ ] Dingo Quadruped Overview How Dingo_driver Works Project Structure Installation of Code Natively Docker Container Preparing vscode Building and/or opening the container in vscode Running the code Dingo_Driver Launching the gazebo simulation Extra Notes on Running in the Docker Container Using the ros workspace in vscode Debugging with vscode README.md Dingo Quadruped [JEL05566] Overview This repository hosts the code for the Dingo Quadruped, a robot designed to be low-cost but capable of conducting research and being extensively modified with additional actuators and sensors. CAD for the Dingo can be found here. A full Bill of materials for purchasable components can be found within this repo. This code is based on the Stanford Pupper and notspot codebases, with extensive modifications, including integration into ROS 1 Noetic. The repository includes a driver node, dingo_driver.py, which should be used anytime the code is run. This file enables joystick control of the Dingo, and allows joint and/or task space commands generated by any other code to be passed through the driver via the appropriate ROS command topics. The joystick can also be toggled on and off to override commands received via ROS command topics The repo also includes a gazebo simulation of the Dingo, based on URDF file and meshes which are also provide. How Dingo_driver Works The following flow diagram shows a simplified overview of how a joystick command is handled by the driver to affect joint movements: [Dingo_driver] Project Structure +-- assets Images used in the readme file +-- dingo_nano Code for the Arduino Nano V3 to read sensor data and send it to the Raspberry Pi +-- dingo_ws ROS workspace containing all required packages +-- src +-- dingo Package containing node and launch files for running the robot +-- dingo_control Package containing all files related to control, including kinematics and default trot controller +-- dingo_description Package containing simulation files (URDF file and meshes) +-- dingo_gazebo Package containing gazebo files +-- dingo_hardware_interfacing | +-- dingo_input_interfacing Package containing files for receiving and interpreting commands (From a joystick or keyboard) | +-- dingo_peripheral_interfacing Package containing files for interfacing with the Arduino Nano, LCD screen and IMU | +-- dingo_servo_interfacing Package containing the hardware interface for sending joint angles to the servo motors +-- dingo_utilities Package containing useful utilities Installation of Code Natively * Install Ubuntu 20.04 * Install ros-noetic * Install git via sudo apt-get install git * Create a new folder in your home folder: mkdir ~/any_folder_name * Change directory to the new folder just created: cd ~/ any_folder_name * Clone this repository into the folder using git: git clone ... * Move into the dingo_ws folder: cd /dingo_ws * Initialise rosdep: sudo rosdep init * Fetch dependencies with rosdep: rosdep update * Build the workspace: catkin build * Source the workspace: source devel/setup.bash * (Optional) Add a line to .bashrc to automatically source the workspace: echo "source ~/any_folder_name/DingoQuadruped/dingo_ws /devel/setup.bash" >> ~/.bashrc, source ~/.bashrc Docker Container The files inside the base directory enable a docker container to be built and the code to inspected and debugged in visual studio code. This is mostly for debugging purposes, and is best for an external device debugging or adding to the code, rather than being used on the quadruped itself. Note: These instructions assume a linux OS. Preparing vscode * Install docker * Install vscode * Open vscode and add the following extensions: C/C++ Extension Pack, Docker, Dev Containers, ROS * close vscode once extensions are installed Building and/or opening the container in vscode * In terminal, open the base folder containing the dingo quadruped code: cd ~/any_folder_name/DingoQuadruped * run . code to open the dingo quadruped base folder in vscode * A prompt will appear saying either to build the container or run it, click "build" or "run" * Wait for the container to be built and initialised * (First time only) Once the container is built, Check that "ROS1.noetic" appears in the bottom left to indicate that the ros extension has correctly detected the ros version inside the container. If it does not appear, follow these steps Running the code Dingo_Driver The Dingo_Driver should be started before any other code is launched on the Dingo. It starts joystick control of the robot and allows joint and task space commands to be received from other code or controllers via command ROS topics, as long as joystick control is disabled. If enabled, joystick control will override any commands sent through the command topics. To launch it, run the following line: roslaunch dingo dingo.launch Arguments are: * is_physical (0/1): Is the code being run on the Dingo itself? Default: "1" (Yes) * is_sim (0/1): Should the code publish joint values to the simulator? Default: "0" (No) * use_joystick (0/1): Is a joystick being used for control? Default: "1" (Yes) * use_keyboard (0/1): Is the keyboard being used for control? Default: "0" (No) * (currently not used) serial_port (name of port): The serial port that the nano is connected to. Default: "/dev/ttyS0" * use_imu (0/1): Should IMU data be used to correct the robots joint angles? Default: "0" (No) With no arguments specified, it will assume a joystick controller is used for control and it will launch the hardware interface with IMU feedback disabled. No joint data will be published for Gazebo to use to simulate the robot. As an example of how the arguments can be used, if the code is to be run purely in simulation with joystick control, you would launch the driver with the following arguments: roslaunch dingo dingo.launch is_physical:=0 is_sim:=1 Launching the gazebo simulation Make sure dingo_driver is running first, then: roslaunch dingo_gazebo simulation.launch Extra Notes on Running in the Docker Container Using the ros workspace in vscode The ROS extension provides options to roslaunch and rosrun files inside vscode via the inbuilt terminal without needing to use the native linux terminal. The commands to do so are the same as natively. To start/stop a roscore daemon inside vscode, you can type ctrl+shift+P in vscode, and then type ROS: Start to start and ROS: Stop to stop the roscore daemon. To build or rebuild the ros workspace, type ctrl+shift+B. If this does not work, you may need to edit the tasks.json file which tells vscode how to build the container. Ensure that the catkin build task defined in tasks.json includes the option -DCMAKE_BUILD_TYPE=Debug, as without this the vscode debugger will not work correctly. An important note, as the entire ros workspace is volume mounted, files can be edited inside the container and reflected in your native linux filesystem and vice versa. This means the code can be changed and debugged in the vscode container but run natively, with all changes being reflected. Debugging with vscode The ROS extension has two options to enable debugging. The first is to attach to a running node which you start via the terminal with rosrun package_name node_name. The second is to debug from a launch file, where you use the debugger menu in vscode to launch a launch file and then set waypoints in any nodes which the launch file starts. To set this up, please watch this video If the debugger is not stopping at breakpoints, you may need to edit the tasks.json file which tells vscode how to build the container. Ensure that the catkin build task defined in tasks.json includes the option -DCMAKE_BUILD_TYPE=Debug. About Base code for the Dingo quadruped; modified from Stanford Pupper and Notspot repositories. Includes integration with ROS Noetic and a simulation of the Dingo Resources Readme Stars 445 stars Watchers 21 watching Forks 437 forks Report repository Releases No releases published Packages 0 No packages published Languages * C++ 91.1% * Python 4.7% * CMake 1.6% * Processing 1.5% * C 0.9% * Jupyter Notebook 0.1% * Other 0.1% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.