Keyboard PR2 Teleop

I ran the following example,
https://app.theconstructsim.com/#/l/42d0ca09/

I did run the command but the robot base is not moving anywhere.
roslaunch pr2_tc_teleop keyboard_teleop.launch

There are no error messages and the topics are being published.

Can you please help me to show the movement of the PR2?

Hi @kavi1 ,

We can debug the ROS env.

  1. Are you publishing to the correct topic? This node usually publishes to /cmd_vel, is this the same topic the robot is subscribing to?

  2. Can you check if the proper topic is receiving messages? Use rostopic echo /cmd_vel, for example

Regards

When I launch the PR2 Gazebo Simulation in ROS Noetic from the icon, the /cmd_vel is not visible even when I write the command rostopic list. The output I get is the following:

/base_bumper
/base_pose_ground_truth
/base_scan
/camera/depth_registered/camera_info
/camera/depth_registered/image_raw
/camera/depth_registered/points
/camera/parameter_descriptions
/camera/parameter_updates
/camera/rgb/camera_info
/camera/rgb/image_raw
/camera/rgb/image_raw/compressed
/camera/rgb/image_raw/compressed/parameter_descriptions
/camera/rgb/image_raw/compressed/parameter_updates
/camera/rgb/image_raw/compressedDepth
/camera/rgb/image_raw/compressedDepth/parameter_descriptions
/camera/rgb/image_raw/compressedDepth/parameter_updates
/camera/rgb/image_raw/theora
/camera/rgb/image_raw/theora/parameter_descriptions
/camera/rgb/image_raw/theora/parameter_updates
/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/pr2/bl_caster_l_wheel_joint_controller/command
/pr2/bl_caster_l_wheel_joint_controller/pid/parameter_descriptions
/pr2/bl_caster_l_wheel_joint_controller/pid/parameter_updates
/pr2/bl_caster_l_wheel_joint_controller/state
/pr2/bl_caster_r_wheel_joint_controller/command
/pr2/bl_caster_r_wheel_joint_controller/pid/parameter_descriptions
/pr2/bl_caster_r_wheel_joint_controller/pid/parameter_updates
/pr2/bl_caster_r_wheel_joint_controller/state
/pr2/bl_caster_rotation_joint_controller/command
/pr2/br_caster_l_wheel_joint_controller/command
/pr2/br_caster_l_wheel_joint_controller/pid/parameter_descriptions
/pr2/br_caster_l_wheel_joint_controller/pid/parameter_updates
/pr2/br_caster_l_wheel_joint_controller/state
/pr2/br_caster_r_wheel_joint_controller/command
/pr2/br_caster_r_wheel_joint_controller/pid/parameter_descriptions
/pr2/br_caster_r_wheel_joint_controller/pid/parameter_updates
/pr2/br_caster_r_wheel_joint_controller/state
/pr2/br_caster_rotation_joint_controller/command
/pr2/fl_caster_l_wheel_joint_controller/command
/pr2/fl_caster_l_wheel_joint_controller/pid/parameter_descriptions
/pr2/fl_caster_l_wheel_joint_controller/pid/parameter_updates
/pr2/fl_caster_l_wheel_joint_controller/state
/pr2/fl_caster_r_wheel_joint_controller/command
/pr2/fl_caster_r_wheel_joint_controller/pid/parameter_descriptions
/pr2/fl_caster_r_wheel_joint_controller/pid/parameter_updates
/pr2/fl_caster_r_wheel_joint_controller/state
/pr2/fl_caster_rotation_joint_controller/command
/pr2/fr_caster_l_wheel_joint_controller/command
/pr2/fr_caster_l_wheel_joint_controller/pid/parameter_descriptions
/pr2/fr_caster_l_wheel_joint_controller/pid/parameter_updates
/pr2/fr_caster_l_wheel_joint_controller/state
/pr2/fr_caster_r_wheel_joint_controller/command
/pr2/fr_caster_r_wheel_joint_controller/pid/parameter_descriptions
/pr2/fr_caster_r_wheel_joint_controller/pid/parameter_updates
/pr2/fr_caster_r_wheel_joint_controller/state
/pr2/fr_caster_rotation_joint_controller/command
/pr2/head_joint_controller/command
/pr2/head_joint_controller/follow_joint_trajectory/cancel
/pr2/head_joint_controller/follow_joint_trajectory/feedback
/pr2/head_joint_controller/follow_joint_trajectory/goal
/pr2/head_joint_controller/follow_joint_trajectory/result
/pr2/head_joint_controller/follow_joint_trajectory/status
/pr2/head_joint_controller/state
/pr2/joint_states
/pr2/laser_tilt_mount_joint_controller/command
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/cancel
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/feedback
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/goal
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/result
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/status
/pr2/laser_tilt_mount_joint_controller/state
/pr2/left_arm_controller/command
/pr2/left_arm_controller/follow_joint_trajectory/cancel
/pr2/left_arm_controller/follow_joint_trajectory/feedback
/pr2/left_arm_controller/follow_joint_trajectory/goal
/pr2/left_arm_controller/follow_joint_trajectory/result
/pr2/left_arm_controller/follow_joint_trajectory/status
/pr2/left_arm_controller/state
/pr2/left_gripper_controller/command
/pr2/left_gripper_controller/follow_joint_trajectory/cancel
/pr2/left_gripper_controller/follow_joint_trajectory/feedback
/pr2/left_gripper_controller/follow_joint_trajectory/goal
/pr2/left_gripper_controller/follow_joint_trajectory/result
/pr2/left_gripper_controller/follow_joint_trajectory/status
/pr2/left_gripper_controller/gains/left_left_gripper_finger_joint/parameter_descriptions
/pr2/left_gripper_controller/gains/left_left_gripper_finger_joint/parameter_updates
/pr2/left_gripper_controller/gains/left_right_gripper_finger_joint/parameter_descriptions
/pr2/left_gripper_controller/gains/left_right_gripper_finger_joint/parameter_updates
/pr2/left_gripper_controller/state
/pr2/right_arm_controller/command
/pr2/right_arm_controller/follow_joint_trajectory/cancel
/pr2/right_arm_controller/follow_joint_trajectory/feedback
/pr2/right_arm_controller/follow_joint_trajectory/goal
/pr2/right_arm_controller/follow_joint_trajectory/result
/pr2/right_arm_controller/follow_joint_trajectory/status
/pr2/right_arm_controller/state
/pr2/right_gripper_controller/command
/pr2/right_gripper_controller/follow_joint_trajectory/cancel
/pr2/right_gripper_controller/follow_joint_trajectory/feedback
/pr2/right_gripper_controller/follow_joint_trajectory/goal
/pr2/right_gripper_controller/follow_joint_trajectory/result
/pr2/right_gripper_controller/follow_joint_trajectory/status
/pr2/right_gripper_controller/gains/right_left_gripper_finger_joint/parameter_descriptions
/pr2/right_gripper_controller/gains/right_left_gripper_finger_joint/parameter_updates
/pr2/right_gripper_controller/gains/right_right_gripper_finger_joint/parameter_descriptions
/pr2/right_gripper_controller/gains/right_right_gripper_finger_joint/parameter_updates
/pr2/right_gripper_controller/state
/pr2/torso_lift_joint_controller/command
/pr2/torso_lift_joint_controller/follow_joint_trajectory/cancel
/pr2/torso_lift_joint_controller/follow_joint_trajectory/feedback
/pr2/torso_lift_joint_controller/follow_joint_trajectory/goal
/pr2/torso_lift_joint_controller/follow_joint_trajectory/result
/pr2/torso_lift_joint_controller/follow_joint_trajectory/status
/pr2/torso_lift_joint_controller/state
/rosout
/rosout_agg
/tf
/tf_static
/tilt_scan

However, when I run the rosject from the following
https://app.theconstructsim.com/#/l/42d0ca09/

I get the following output:
/base_bumper
/base_pose_ground_truth
/base_scan
/camera/depth_registered/camera_info
/camera/depth_registered/image_raw
/camera/depth_registered/points
/camera/parameter_descriptions
/camera/parameter_updates
/camera/rgb/camera_info
/camera/rgb/image_raw
/camera/rgb/image_raw/compressed
/camera/rgb/image_raw/compressed/parameter_descriptions
/camera/rgb/image_raw/compressed/parameter_updates
/camera/rgb/image_raw/compressedDepth
/camera/rgb/image_raw/compressedDepth/parameter_descriptions
/camera/rgb/image_raw/compressedDepth/parameter_updates
/camera/rgb/image_raw/theora
/camera/rgb/image_raw/theora/parameter_descriptions
/camera/rgb/image_raw/theora/parameter_updates
/clicked_point
/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/performance_metrics
/gazebo/set_link_state
/gazebo/set_model_state
/initialpose
/joint_states
/move_base_simple/goal
/move_group/cancel
/move_group/feedback
/move_group/goal
/move_group/result
/move_group/status
/pr2/bl_caster_l_wheel_joint_controller/command
/pr2/bl_caster_l_wheel_joint_controller/pid/parameter_descriptions
/pr2/bl_caster_l_wheel_joint_controller/pid/parameter_updates
/pr2/bl_caster_l_wheel_joint_controller/state
/pr2/bl_caster_r_wheel_joint_controller/command
/pr2/bl_caster_r_wheel_joint_controller/pid/parameter_descriptions
/pr2/bl_caster_r_wheel_joint_controller/pid/parameter_updates
/pr2/bl_caster_r_wheel_joint_controller/state
/pr2/bl_caster_rotation_joint_controller/command
/pr2/br_caster_l_wheel_joint_controller/command
/pr2/br_caster_l_wheel_joint_controller/pid/parameter_descriptions
/pr2/br_caster_l_wheel_joint_controller/pid/parameter_updates
/pr2/br_caster_l_wheel_joint_controller/state
/pr2/br_caster_r_wheel_joint_controller/command
/pr2/br_caster_r_wheel_joint_controller/pid/parameter_descriptions
/pr2/br_caster_r_wheel_joint_controller/pid/parameter_updates
/pr2/br_caster_r_wheel_joint_controller/state
/pr2/br_caster_rotation_joint_controller/command
/pr2/cmd_vel
/pr2/fl_caster_l_wheel_joint_controller/command
/pr2/fl_caster_l_wheel_joint_controller/pid/parameter_descriptions
/pr2/fl_caster_l_wheel_joint_controller/pid/parameter_updates
/pr2/fl_caster_l_wheel_joint_controller/state
/pr2/fl_caster_r_wheel_joint_controller/command
/pr2/fl_caster_r_wheel_joint_controller/pid/parameter_descriptions
/pr2/fl_caster_r_wheel_joint_controller/pid/parameter_updates
/pr2/fl_caster_r_wheel_joint_controller/state
/pr2/fl_caster_rotation_joint_controller/command
/pr2/fr_caster_l_wheel_joint_controller/command
/pr2/fr_caster_l_wheel_joint_controller/pid/parameter_descriptions
/pr2/fr_caster_l_wheel_joint_controller/pid/parameter_updates
/pr2/fr_caster_l_wheel_joint_controller/state
/pr2/fr_caster_r_wheel_joint_controller/command
/pr2/fr_caster_r_wheel_joint_controller/pid/parameter_descriptions
/pr2/fr_caster_r_wheel_joint_controller/pid/parameter_updates
/pr2/fr_caster_r_wheel_joint_controller/state
/pr2/fr_caster_rotation_joint_controller/command
/pr2/head_joint_controller/command
/pr2/head_joint_controller/follow_joint_trajectory/cancel
/pr2/head_joint_controller/follow_joint_trajectory/feedback
/pr2/head_joint_controller/follow_joint_trajectory/goal
/pr2/head_joint_controller/follow_joint_trajectory/result
/pr2/head_joint_controller/follow_joint_trajectory/status
/pr2/head_joint_controller/state
/pr2/joint_states
/pr2/laser_tilt_mount_joint_controller/command
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/cancel
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/feedback
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/goal
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/result
/pr2/laser_tilt_mount_joint_controller/follow_joint_trajectory/status
/pr2/laser_tilt_mount_joint_controller/state
/pr2/left_arm_controller/command
/pr2/left_arm_controller/follow_joint_trajectory/cancel
/pr2/left_arm_controller/follow_joint_trajectory/feedback
/pr2/left_arm_controller/follow_joint_trajectory/goal
/pr2/left_arm_controller/follow_joint_trajectory/result
/pr2/left_arm_controller/follow_joint_trajectory/status
/pr2/left_arm_controller/state
/pr2/left_gripper_controller/command
/pr2/left_gripper_controller/follow_joint_trajectory/cancel
/pr2/left_gripper_controller/follow_joint_trajectory/feedback
/pr2/left_gripper_controller/follow_joint_trajectory/goal
/pr2/left_gripper_controller/follow_joint_trajectory/result
/pr2/left_gripper_controller/follow_joint_trajectory/status
/pr2/left_gripper_controller/gains/left_left_gripper_finger_joint/parameter_descriptions
/pr2/left_gripper_controller/gains/left_left_gripper_finger_joint/parameter_updates
/pr2/left_gripper_controller/gains/left_right_gripper_finger_joint/parameter_descriptions
/pr2/left_gripper_controller/gains/left_right_gripper_finger_joint/parameter_updates
/pr2/left_gripper_controller/state
/pr2/right_arm_controller/command
/pr2/right_arm_controller/follow_joint_trajectory/cancel
/pr2/right_arm_controller/follow_joint_trajectory/feedback
/pr2/right_arm_controller/follow_joint_trajectory/goal
/pr2/right_arm_controller/follow_joint_trajectory/result
/pr2/right_arm_controller/follow_joint_trajectory/status
/pr2/right_arm_controller/state
/pr2/right_gripper_controller/command
/pr2/right_gripper_controller/follow_joint_trajectory/cancel
/pr2/right_gripper_controller/follow_joint_trajectory/feedback
/pr2/right_gripper_controller/follow_joint_trajectory/goal
/pr2/right_gripper_controller/follow_joint_trajectory/result
/pr2/right_gripper_controller/follow_joint_trajectory/status
/pr2/right_gripper_controller/gains/right_left_gripper_finger_joint/parameter_descriptions
/pr2/right_gripper_controller/gains/right_left_gripper_finger_joint/parameter_updates
/pr2/right_gripper_controller/gains/right_right_gripper_finger_joint/parameter_descriptions
/pr2/right_gripper_controller/gains/right_right_gripper_finger_joint/parameter_updates
/pr2/right_gripper_controller/state
/pr2/torso_lift_joint_controller/command
/pr2/torso_lift_joint_controller/follow_joint_trajectory/cancel
/pr2/torso_lift_joint_controller/follow_joint_trajectory/feedback
/pr2/torso_lift_joint_controller/follow_joint_trajectory/goal
/pr2/torso_lift_joint_controller/follow_joint_trajectory/result
/pr2/torso_lift_joint_controller/follow_joint_trajectory/status
/pr2/torso_lift_joint_controller/state
/rosout
/rosout_agg
/rviz_visual_tools_gui
/surface_objects
/surface_objects_array
/tf
/tf_static
/tilt_scan

Why does this happen?

Also, I tried the following command in the rosject
rostopic pub /pr2/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}}’

I tried it multiple times and the robot is not moving in any direction. I also echoed it and it is being updated but the model is not moving in Gazebo.

Is there anything I can do to fix this?

Thank you

Any suggestions please?

Hi,

You seem to have problems launching the controllers of the simulation.

You shared two topics lists, I’m assuming from two different rosjects?
When you publish to /pr2/cmd_vel on the simulation that does list it, does it still not work?

What is the output of the terminal where you are launching the gazebo simulation?

Hi,

There are tow issues which are solve like this:

  1. The movei sysems seem to not be updated, so you should update them to be able to use the arms. The indicative that its working is that the arms get tucked away. To do so execute the following commands in any terminal before launching anything.

sudo apt update
sudo apt install -y ros-noetic-moveit-core

This might not be necessay after the next sysem update but just in case.

  1. The teleop works erfectly the only thing is that you have o send a very high speed, around 40-70. You can increase it by pressing Q in the keyboard. Also be patient becuase this ROSject is really heavy on the free system and the simulation works with a real factor of 0.15 which is very low ( normal is 0.99 ). So take that into account. It also is launching RVIZ and the controller GUI.

Thank you so much! After increasing the speed to 150, I can see the movement.

Two simple questions, please:

  1. How can we “rostopic pub” to the speed directly as a command?

  2. When I launch from the Gazebo icon the /pr2/cmd_vel is not visible. How do I enable this?

Hi.

How can we “rostopic pub” to the speed directly as a command?

rostopic pub geometry_msgs/Twist [DOUBLE TAB and set the desired values]

When I launch from the Gazebo icon the /pr2/cmd_vel is not visible. How do I enable this?

Could make a video or pictore of that issue? I dont quite understand what you mean

Thank you! I was trying to get the simulation running from Gazebo icon. I understand now.

Is there a MoveIt package available for ROS Noetic for the PR2?

Thank you

The current version we have is for noetic :wink:

@duckfrost2 That is what I need! Thank you.

Is there any existing ROSject with PR2 MoveIt for Noetic because I want to understand it, how to use the groups in order to manipulate the end effector in Python?

Also, I’m unable to determine which topic is the odometer the PR2. I did display all the topics, but the odometer is not visible. Can you please help me?

I tried to get data from the pr2_moveit package, by accessing it through the Moveit Wizard:
roslaunch moveit_setup_assistant setup_assistant.launch

I get the following error
[ERROR] [1634683215.044553337]: [setParam] Failed to contact master at [4_xterm:11311]. Retrying…

Can you please let me how I can fix it?

How do I launch the PR2 to manipulate the end-effector in MoveIt in Noetic?

Also, what is the best way to find the odometer in Noetic with the PR2 robot?

Thank you

That error is becuase you dont have the simulation launched.

You can launch it through for example this launch:

roslaunch pr2_gazebo main_elephant_person.launch

main_elephant_person.launch

But set insid ethat launch the variable:

This should launch the Moveint system in RVIZ

I followed the instructions but still not working.
Here is the ROSject: Learn Robotics from Zero - Robotics & ROS Online Courses

The commands were:
roslaunch pr2_tc_gazebo main_elephant_person.launch
roslaunch moveit_setup_assistant setup_assistant.launch

Here’s the screenshot after loads only 30% of it.


The same error message is:
I get the following error
[ERROR] [1634683215.044553337]: [setParam] Failed to contact master at [4_xterm:11311]. Retrying…

Can you please let me how I can fix it? I want to change the planning groups for the end effector.

Apologies for the crosspost
Here is the ROSject: Learn Robotics from Zero - Robotics & ROS Online Courses

Challenge 1: There is no PR2 odometry topic published in Noetic
Goal 1: Move PR2 to a Certain Point Using Twist as [ROS Q&A] 053 - How to Move a Robot to a Certain Point Using Twist - The Construct

Challenge 2: Use MoveIt with PR2 robot in Noetic
Goal 2: Move the end effectors of both arms of the PR2 robot simulation in Gazebo as [ROSDS] 008 - Use MoveIt with PR2 robot in ROS Kinetic Gazebo Easy Guide - The Construct

Challenge 3: Inverse kinematics for the PR2 arms in Noetic
Goal 3: Point-and-click and compute inverse kinematics for the tip link of the PR2 arm.
For the IK, I’d like the end effector to move to the location clicked on the screen on a webpage. Please see the following video: Robot Control Interface Instructions (target) - YouTube

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.