HITSZ-LeggedRobotics / simple_dog_simulation

A sim four leg robot simulation with gazebo
7 stars 6 forks source link

simple_dog_simulation

A simulation four leg robot simulation with gazebo TODO(Shunyao): add a foot contact sensor

Build

cd your_catkin_ws/src
catkin_make
source ~/.bashrc

Usage

How to control the robot

Publish ROS msg sensor_msgs/JointStates topic: joint position array of 12 elements

ros::Publisher joint1ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("front_left_1_joint_position_controller/command",1);
ros::Publisher joint2ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("front_left_2_joint_position_controller/command",1);
ros::Publisher joint3ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("front_left_3_joint_position_controller/command",1);
ros::Publisher joint4ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("front_right_1_joint_position_controller/command",1);
ros::Publisher joint5ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("front_right_2_joint_position_controller/command",1);
ros::Publisher joint6ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("front_right_3_joint_position_controller/command",1);
ros::Publisher joint7ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("rear_right_1_joint_position_controller/command",1);
ros::Publisher joint8ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("rear_right_2_joint_position_controller/command",1);
ros::Publisher joint9ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("rear_right_3_joint_position_controller/command",1);
ros::Publisher joint10ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("rear_left_1_joint_position_controller/command",1);
ros::Publisher joint11ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("rear_left_2_joint_position_controller/command",1);
ros::Publisher joint12ControllerCommandPub =
        nh.advertise<std_msgs::Float64>("rear_left_3_joint_position_controller/command",1);

There also joint feed back, rostopic list to see some feedback topic