Skip to content

ggldnl/Hexapod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Hexapod ROS node

Hello world

Prerequisites

Obviously, you need to install an set up ROS2.

Build the workspace

git clone https://github.com/ggldnl/Hexapod.git hexapod
cd hexapod
colcon build --symlink-install
source install/local_setup.bash  # or whatever shell you use

Single leg simulation & visualization

Issue the following command to visualize the leg in RViz and open the joint_state_publisher_gui node; this will let you manually control each joint:

ros2 launch leg_simulation display.launch.py

To simulate the leg in Gazebo, run the following commands in two separate terminals:

ros2 launch leg_simulation gazebo.launch.py
ros2 topic pub -1 /set_joint_trajectory trajectory_msgs/msg/JointTrajectory  '{header: {frame_id: world}, joint_names: [coxa_joint,femur_joint,tibia_joint], points: [{positions: {0.0,0.0,0.0}}]}'

The latter, as is, will put the leg in the default configuration; play with the joint values (positions) to try new configurations. The coxa joint can take values between -pi/2 (-90 deg) and pi/2 (90 deg). The femur joint can take values between -pi/2 (-90 deg) and 0.87 (50 deg). The tibia joint can take values between -pi (-180 deg) and 0.

Body simulation & visualization

Directory Structure

  • description/: Contains the urdf/xacro description files for the robot;
  • launch/: Contains launch files;
  • leg_simulation/: Contains the code to test the robot;
  • meshes/: Contains the simplified meshes for the robot; the real meshes can be found in this repository (along with schematics and everything we need to replicate the hardware) and have been modified in order to lower the complexity for the simulation (joined fixed bodies that will be printed separately); Gazebo already merges links tied by fixed joints but this made my life easier when describing the urdf;
  • resource/: Contains an empty file with the name of the ROS package;
  • rviz/: Contains a custom RViz configuration;
  • test/: Contains test scripts generated by the ros2 pkg create command (I never actually used them);

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages