-
Notifications
You must be signed in to change notification settings - Fork 3
Operating the robot
If you are not accessing the robot directly, connect to the running OP2 via SSH
ssh robotis@robotis
First we need to kill the default demo program to free the hardware. Run in a terminal on the OP2.
sudo killall demo
Afterwards we can launch the ROS interface (Attention: Depending on your configuration, the robot might stand up)
roslaunch robotis_op_onboard_launch robotis_op_whole_robot.launch
Check the ROS_MASTER_URI in terminal output (default: ROS_MASTER_URI=http://robotis:11311/).
Troubleshooting: If the robot gets stuck during the launch, kill the process(ctrl+c), reset the actuators and call roslaunch again.
Use the OP2 ROS_MASTER_URI from OP2. Run in a terminal on a PC.
export ROS_MASTER_URI=http://robotis:11311/
Start RViz
roslaunch robotis_op_ui_launch robotis_op_rviz.launch
In the RViz control panel on the left side you can change “Fixed Frame” from “MP_BODY” to “world” to use the IMU orientation as reference frame for the robot.
Start the Teleoperation modus
roslaunch robotis_op_teleop robotis_op_teleop_keyboard
Usage instructions will show up in the terminal
The robot can be operated by sending messages on topics. If you haven't heard about topics, nodes and messages, have a look at the ROS tutorials. To see all available topics
rostopic list
To get more information about a topic rostopic info TOPIC_NAME
Example
rostopic info /robotis_op/cmd_vel
All topics starting with /robotis_op/ are related to the Robotis OP2.
/robotis_op/j_*/command command a joint position (radian) to the corresponding actuator
Example
rostopic pub /robotis_op/j_shoulder_r_position_controller/command std_msgs/Float64 "data: 0.8"
/robotis_op/enable_walking enables walking
Example
rostopic pub /robotis_op/enable_walking std_msgs/Bool "data: true"
/robotis_op/cmd_vel sets the walking velocity and direction
Example
rostopic pub /robotis_op/cmd_vel geometry_msgs/Twist '{linear: {x: 0.5, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}'
/robotis_op/start_action start a predefined motion sequence
Example
rostopic pub /robotis_op/start_action std_msgs/Int32 "data: 3"
Start the rqt_reconfigure GUI to modify parameters while the robot is running
rosrun rqt_reconfigure rqt_reconfigure
Attention: Be careful when manipulating the control parameters to avoid damage to the robot.
Start rqt_graph to get an overview over the currently running nodes.
rqt_graph