Closed lukasehr closed 8 months ago
Hi there!
Yes, you need a gamepad, or u can open hyperdog_joy_ctrl_cmd
topic in rqt. Then you can control the robot with changing following variables of the topic msg type.
states[0] = true
: to wake the robot up.
states[1] = true
: to enable walking
states[2] =true
and states[2] = false
: to change the side move (linear or angular)
pose.position.z
: to adjust the height of the robot
pose.orientation.x
: to change roll angle
pose.orientation.y
: to change pitch angle
pose.orientation.z
: to change yaw angle
gait_step.x
: step length in x direction (positive value to move forward, negative value to move backward)
gait_step.y
: step length in y direction (right and left movements depending on the value is positive or negative )
Please note that due to an issue with ros2_control
package, robot is sliding over the ground in gazebo simulation.
Thank you for the fast answer! The Idea with rqt was brilliant! Just one more thing: The robot doesn't really start moving. This is what I am doing right now:
1) Start Gazebo with ros2 launch hyperdog_gazebo_sim hyperdog_gazebo_sim.launch.py 2) Start the teleop node with ros2 launch hyperdog_teleop hyperdog_teleop.launch.py 3) Using my Sony Dualshock 3 Controller I set the states to [true, true, false] 4) I don't know how to change the pose.position.z with my controller so I set that to 100 via rqt. 5) I also don't know how to change the gait_step.z with the controller so I set that to 100 via rqt.
As far as I understand, now I should be able to make the robot move with the Joysticks. However that does not happen? (Also the height doesn't change in gazebo?
Do you have an idea what I am doing wrong? I am using Gazebo-11 and Ros2 Humble on an Ubuntu 22.04 System.
Update: I realised I have to also start ros2 launch hyperdog_launch hyperdog.launch.py in order to make the whole thing work. Now the Robot does (more or less) what I want it to do and I can see it moving in Gazebo. Only thing I have to do now is order a Logitech F710 because the Gamepad I have doesn't have all the buttons I need :laughing:
Thanks a lot for helping and providing the repo!
Yeah, hyperdog.launch.py is launching all the other necessary nodes to control the robot.
Hi there, I am currently trying to get my Gazebo Simulation with Hyperdog running. Is it correct that I need a gamepad to make the robot move in Gazebo/Rviz2?
Or is there a way to control it via "ros2 topic pub ..."? I tried publishing to /vel_cmd, but it did not work, I guess it's because the robot has to wake up/ start walk before it can work with /vel_cmd, right?
I am sorry about those (stupid) questions, would really appreciate an answer.