ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Controlling multiple huskies in ROS Gazebo

asked 2021-04-29 14:06:19 -0500

anonymous user

Anonymous

Hey all, I'm very new to this software and am trying to figure out how to do basic control of multiple Huskies.

I'm just trying to replicate this very simple way of moving a single husky:

roscore
roslaunch husky_gazebo husky_playpen.launch

then running:

rostopic pub /husky_velocity_controller/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" -r 10

to cause it to drive indefinitely, which is visible in gazebo.

I then launched: roslaunch husky_gazebo multi_husky_playpen.launch and ran:

rostopic list

to see find the equivalent velocity controller for each husky thats been spawned. Full output from this at the end. I thought from here it would be easy to just run:

rostopic pub /husky_alpha/husky_velocity_controller/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" -r 10

and get the same behavior, being able to choose which husky moves by specifying the namespace of the 3 different huskies. However, it's apparently not this simple, as the corresponding husky_alpha in gazebo doesn't start moving. What extra kind of stuff is necessary to be able to seperately control multiple huskies?

rostopic list output:

/clock
/clock_offset
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/gazebo_gui/parameter_descriptions
/gazebo_gui/parameter_updates
/husky_alpha/husky_velocity_controller/cmd_vel
/husky_alpha/husky_velocity_controller/odom
/husky_alpha/imu/data
/husky_alpha/imu/data/accel/parameter_descriptions
/husky_alpha/imu/data/accel/parameter_updates
/husky_alpha/imu/data/bias
/husky_alpha/imu/data/rate/parameter_descriptions
/husky_alpha/imu/data/rate/parameter_updates
/husky_alpha/imu/data/yaw/parameter_descriptions
/husky_alpha/imu/data/yaw/parameter_updates
/husky_alpha/joint_states
/husky_alpha/navsat/fix
/husky_alpha/navsat/fix/position/parameter_descriptions
/husky_alpha/navsat/fix/position/parameter_updates
/husky_alpha/navsat/fix/status/parameter_descriptions
/husky_alpha/navsat/fix/status/parameter_updates
/husky_alpha/navsat/fix/velocity/parameter_descriptions
/husky_alpha/navsat/fix/velocity/parameter_updates
/husky_alpha/navsat/vel
/husky_alpha/scan
/husky_beta/husky_velocity_controller/cmd_vel
/husky_beta/husky_velocity_controller/odom
/husky_beta/imu/data
/husky_beta/imu/data/accel/parameter_descriptions
/husky_beta/imu/data/accel/parameter_updates
/husky_beta/imu/data/bias
/husky_beta/imu/data/rate/parameter_descriptions
/husky_beta/imu/data/rate/parameter_updates
/husky_beta/imu/data/yaw/parameter_descriptions
/husky_beta/imu/data/yaw/parameter_updates
/husky_beta/joint_states
/husky_beta/navsat/fix
/husky_beta/navsat/fix/position/parameter_descriptions
/husky_beta/navsat/fix/position/parameter_updates
/husky_beta/navsat/fix/status/parameter_descriptions
/husky_beta/navsat/fix/status/parameter_updates
/husky_beta/navsat/fix/velocity/parameter_descriptions
/husky_beta/navsat/fix/velocity/parameter_updates
/husky_beta/navsat/vel
/husky_beta/scan
/husky_gamma/husky_velocity_controller/cmd_vel
/husky_gamma/husky_velocity_controller/odom
/husky_gamma/imu/data
/husky_gamma/imu/data/accel/parameter_descriptions
/husky_gamma/imu/data/accel/parameter_updates
/husky_gamma/imu/data/bias
/husky_gamma/imu/data/rate/parameter_descriptions
/husky_gamma/imu/data/rate/parameter_updates
/husky_gamma/imu/data/yaw/parameter_descriptions
/husky_gamma/imu/data/yaw/parameter_updates
/husky_gamma/joint_states
/husky_gamma/navsat/fix
/husky_gamma/navsat/fix/position/parameter_descriptions
/husky_gamma/navsat/fix/position/parameter_updates
/husky_gamma/navsat/fix/status/parameter_descriptions
/husky_gamma/navsat/fix/status/parameter_updates
/husky_gamma/navsat/fix/velocity/parameter_descriptions
/husky_gamma/navsat/fix/velocity/parameter_updates
/husky_gamma/navsat/vel
/husky_gamma/scan
/master_discovery/changes
/master_discovery/linkstats
/rosout
/rosout_agg
/sim/clock
/sim/husky_alpha/husky_velocity_controller/cmd_vel
/sim/husky_alpha/husky_velocity_controller/odom
/sim/husky_alpha/imu/data
/sim/husky_alpha ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-12 16:52:28 -0500

osilva gravatar image

I suggest you look at this repo to give you a start how to work with multiple robots: https://github.com/Shilpaj1994/Turtle...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-04-29 14:06:19 -0500

Seen: 138 times

Last updated: Apr 29 '21