jetbotROSのgazeboシミュレーター環境を試しに動かしてみる


以下にjetbotROSのgazeboシミュレーター環境が公開されていたので、試しに動かしてみる

https://github.com/kimbring2/DeepSoccer

パッケージインストール

sudo apt-get install ros-melodic-ros-control ros-melodic-ros-controllers ros-melodic-joint-state-controller ros-melodic-effort-controllers ros-melodic-position-controller

シミュレータを起動

2) Gazebo test
roslaunch jetbot_gazebo main.launch

4) How to manually send a wheel velocity commands

The range of velocity that can be given to the wheel is 0 to 100.

Left Wheel(For robot1, robot2) rostopic pub -1 /robot1/joint1_velocity_controller/command std_msgs/Float64 "data: 30" rostopic pub -1 /robot2/joint1_velocity_controller/command std_msgs/Float64 "data: 30"

Right Wheel(For robot1, robot2) rostopic pub -1 /robot1/joint2_velocity_controller/command > std_msgs/Float64 "data: 30" rostopic pub -1 /robot2/joint2_velocity_controller/command std_msgs/Float64 "data: 30"

上記を参考にrostopicをpublishするとjetbotが移動する(タイヤが回転する)ことを確認

rostopic pub -1 /robot1/joint1_velocity_controller/command std_msgs/Float64 "data: 30"
rostopic pub -1 /robot1/joint2_velocity_controller/command > std_msgs/Float64 "data: 30"

その他

image topicを取得すればカメラ映像を表示できそう
$ rostopic list
/clock
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/set_link_state
/gazebo/set_model_state
/robot1/camera1/camera_info
/robot1/camera1/image_raw
/robot1/camera1/image_raw/compressed
/robot1/camera1/image_raw/compressed/parameter_descriptions
/robot1/camera1/image_raw/compressed/parameter_updates
/robot1/camera1/image_raw/compressedDepth
/robot1/camera1/image_raw/compressedDepth/parameter_descriptions
/robot1/camera1/image_raw/compressedDepth/parameter_updates
/robot1/camera1/image_raw/theora
/robot1/camera1/image_raw/theora/parameter_descriptions
/robot1/camera1/image_raw/theora/parameter_updates
/robot1/camera1/parameter_descriptions
/robot1/camera1/parameter_updates
/robot1/cmd_vel
/robot1/joint1_velocity_controller/command
/robot1/joint2_velocity_controller/command
/robot1/joint_states
/robot1/odom
/robot2/camera1/camera_info
/robot2/camera1/image_raw
/robot2/camera1/image_raw/compressed
/robot2/camera1/image_raw/compressed/parameter_descriptions
/robot2/camera1/image_raw/compressed/parameter_updates
/robot2/camera1/image_raw/compressedDepth
/robot2/camera1/image_raw/compressedDepth/parameter_descriptions
/robot2/camera1/image_raw/compressedDepth/parameter_updates
/robot2/camera1/image_raw/theora
/robot2/camera1/image_raw/theora/parameter_descriptions
/robot2/camera1/image_raw/theora/parameter_updates
/robot2/camera1/parameter_descriptions
/robot2/camera1/parameter_updates
/robot2/cmd_vel
/robot2/joint1_velocity_controller/command
/robot2/joint2_velocity_controller/command
/robot2/joint_states
/robot2/odom
/rosout
/rosout_agg
/tf
/tf_static

参考

https://github.com/kimbring2/DeepSoccer
Jetbot
JetBot Model for Gazebo Robotics Simulator