Ask Your Question
0

Trying to move husky robot with teleop_twist_keyboard

asked 2018-07-06 09:14:23 -0500

Elric gravatar image

updated 2018-07-06 13:50:10 -0500

I've just started to learn ROS, and I'm following the course: Programming for Robotics.

In Lecture 1, they asked to run Husky simulator package. I'm using ROS Lunar version, so I've had to compile it. In fact, I have had to compile all of these packages:

  • geographic_info
  • husky
  • interactive_marker_twist_server
  • lms1xx
  • robot_localization
  • ros_control
  • teleop_twist_keyboard
  • twist_mux
  • unique_identifier

I have created this launch file:

<?xml version="1.0"?>
<launch>
   <include file="$(find husky_gazebo)/launch/husky_empty_world.launch" >
      <arg name="world_name" value="/usr/share/gazebo-7/worlds/robocup14_spl_field.world" />
   </include>

   <node name="teleop" pkg="teleop_twist_keyboard" type="teleop_twist_keyboard.py" output="screen" />
</launch>

Bur, when I try to move the robot with the keyboard, selecting the terminal where I have launched the launch file, it doesn't. It only appears this on terminal window:

SUMMARY
========

PARAMETERS
 * /ekf_localization/base_link_frame: base_link
 * /ekf_localization/frequency: 50
 * /ekf_localization/imu0: imu/data
 * /ekf_localization/imu0_config: [False, False, Fa...
 * /ekf_localization/imu0_differential: True
 * /ekf_localization/imu0_queue_size: 10
 * /ekf_localization/imu0_remove_gravitational_acceleration: True
 * /ekf_localization/odom0: husky_velocity_co...
 * /ekf_localization/odom0_config: [False, False, Fa...
 * /ekf_localization/odom0_differential: False
 * /ekf_localization/odom0_queue_size: 10
 * /ekf_localization/odom_frame: odom
 * /ekf_localization/two_d_mode: True
 * /ekf_localization/world_frame: odom
 * /gazebo/enable_ros_network: True
 * /husky_joint_publisher/publish_rate: 50
 * /husky_joint_publisher/type: joint_state_contr...
 * /husky_velocity_controller/angular/z/has_acceleration_limits: True
 * /husky_velocity_controller/angular/z/has_velocity_limits: True
 * /husky_velocity_controller/angular/z/max_acceleration: 6.0
 * /husky_velocity_controller/angular/z/max_velocity: 2.0
 * /husky_velocity_controller/base_frame_id: base_link
 * /husky_velocity_controller/cmd_vel_timeout: 0.25
 * /husky_velocity_controller/enable_odom_tf: False
 * /husky_velocity_controller/estimate_velocity_from_position: False
 * /husky_velocity_controller/left_wheel: ['front_left_whee...
 * /husky_velocity_controller/linear/x/has_acceleration_limits: True
 * /husky_velocity_controller/linear/x/has_velocity_limits: True
 * /husky_velocity_controller/linear/x/max_acceleration: 3.0
 * /husky_velocity_controller/linear/x/max_velocity: 1.0
 * /husky_velocity_controller/pose_covariance_diagonal: [0.001, 0.001, 0....
 * /husky_velocity_controller/publish_rate: 50
 * /husky_velocity_controller/right_wheel: ['front_right_whe...
 * /husky_velocity_controller/twist_covariance_diagonal: [0.001, 0.001, 0....
 * /husky_velocity_controller/type: diff_drive_contro...
 * /husky_velocity_controller/velocity_rolling_window_size: 2
 * /husky_velocity_controller/wheel_radius_multiplier: 1.0
 * /husky_velocity_controller/wheel_separation_multiplier: 1.875
 * /robot_description: <?xml version="1....
 * /rosdistro: lunar
 * /rosversion: 1.13.6
 * /twist_mux/locks: [{'topic': 'e_sto...
 * /twist_mux/topics: [{'topic': 'joy_t...
 * /use_sim_time: True

NODES
  /
    base_controller_spawner (controller_manager/spawner)
    ekf_localization (robot_localization/ekf_localization_node)
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_husky_model (gazebo_ros/spawn_model)
    teleop (teleop_twist_keyboard/teleop_twist_keyboard.py)
    twist_marker_server (interactive_marker_twist_server/marker_server)
    twist_mux (twist_mux/twist_mux)

auto-starting new master
process[master]: started with pid [25984]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 2bffeb0c-8126-11e8-bd69-fcaa149ccb50
process[rosout-1]: started with pid [25997]
started core service [/rosout]
process[gazebo-2]: started with pid [26015]
process[gazebo_gui-3]: started with pid [26026]
process[base_controller_spawner-4]: started with pid [26031]
process[ekf_localization-5]: started with pid [26032]
process[twist_marker_server-6]: started with pid [26033]
process[robot_state_publisher-7]: started with pid [26034]
process[twist_mux-8]: started with pid [26054]
process[spawn_husky_model-9]: started with pid [26072]
process[teleop-10]: started with pid [26106]
[ INFO] [1530886158.885034522]: [twist_marker_server] Initialized.
[ INFO] [1530886159.102619925]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1530886159.102823160]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1530886159.123702779]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1530886159.124722013]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...

Reading from the keyboard  and Publishing to Twist!
---------------------------
Moving around:
   u    i    o
   j    k    l
   m    ,    .

For Holonomic mode (strafing), hold down the shift key:
---------------------------
   U    I    O
   J    K    L
   M    <    >

t : up (+z)
b : down (-z)

anything else ...
(more)
edit retag flag offensive close merge delete

Comments

Can you go to the nodes only drop down, select Nodes and Topics and send the screenshot of that window?

Akash Purandare gravatar imageAkash Purandare ( 2018-07-06 10:20:00 -0500 )edit

@AkashPurandare I have added the screenshot.

Elric gravatar imageElric ( 2018-07-06 13:43:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-07-09 02:55:12 -0500

imraj gravatar image

Hi,

Did you send a command for the desired velocity ? if not, just open another tab on your terminal and run:

rostopic pub /cmd_vel geometry_msgs/Twist '[2.0,0.0,0.0]' '[5.0,1.0,0.0]'.

The numbers in the arg are arbitrary, you can try yours depending on the linear and angular velocity you need.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-07-06 09:14:23 -0500

Seen: 748 times

Last updated: Jul 06 '18