turtlebot3-burger_150.png
turtlebot3-waffle-pi_150.png
turtlebot3-arm_150.png
walking-y2_150.png
turbot3-multi_150.png
turbot3-dl-ros1_150.png
turbot3-ai.png
turbot3-dl-ros2_150.png
turbot3-slam_150.png
turbot3-arm_150.png
turtlebot4-lite_150.png
turtlebot4-pro_150.png
turbot4-dl_150.png
turbot4-ai_150.png
aidriving-racebot_150.png
aidriving-autodrive_150.png
turtlebot-arm_150.png
openmanipulator-x_150.png
Home » walking云台入门教程 » walking云台入门教程-云台控制

walking云台入门教程-云台控制

纠错,疑问,交流: 请进入讨论区请点击进入页面,扫码加入微信群或Q群进行交流

获取最新文章: 扫一扫加入“创客智造”公众号

文章说明

  • 本教程主要介绍如何在ros2环境下启动云台控制

操作步骤

  • 启动云台控制程序,gb2s和gb2l云台默认使用以下命令,gb2m云台运行时需要添加参数turret_type:=gb2m
# gb2s和gb2l云台
$ ros2 launch walking_turret turret.launch.py

# gb2m云台
$ ros2 launch walking_turret turret.launch.py turret_type:=gb2m
  • 查看话题(gb2s和gb2l云台)
$ ros2 topic list
/clicked_point
/goal_pose
/initialpose
/parameter_events
/pxxls/commands/joint_group
/pxxls/commands/joint_single
/pxxls/commands/joint_trajectory
/pxxls/initialpose
/pxxls/joint_states
/pxxls/robot_description
/rosout
/tf
/tf_static
  • 查看话题(gb2m云台)
$ ros2 topic list
/clicked_point
/goal_pose
/initialpose
/parameter_events
/rosout
/tf
/tf_static
/wxxmd/commands/joint_group
/wxxmd/commands/joint_single
/wxxmd/commands/joint_trajectory
/wxxmd/joint_states
/wxxmd/robot_description

请输入图片描述

  • 通过topic pub方式进行控制云台(gb2s和gb2l云台)
#回到初始位姿
$ ros2 topic pub --once /pxxls/commands/joint_group interbotix_xs_msgs/msg/JointGroupCommand "{name: 'all', cmd: [0, 0]}"

# pan舵机逆时针旋转90°,tilt舵机处于原位
$ ros2 topic pub --once /pxxls/commands/joint_group interbotix_xs_msgs/msg/JointGroupCommand "{name: 'all', cmd: [1.57, 0]}"

# tilt舵机顺时针旋转90°,pan舵机处于原位
$ ros2 topic pub --once /pxxls/commands/joint_group interbotix_xs_msgs/msg/JointGroupCommand "{name: 'all', cmd: [0, 1.57]}"
  • 通过topic pub方式进行控制云台(gb2m云台)
#回到初始位姿
$ ros2 topic pub --once /wxxmd/commands/joint_group interbotix_xs_msgs/msg/JointGroupCommand "{name: 'all', cmd: [0, 0]}"

# pan舵机逆时针旋转90°,tilt舵机处于原位
$ ros2 topic pub --once /wxxmd/commands/joint_group interbotix_xs_msgs/msg/JointGroupCommand "{name: 'all', cmd: [1.57, 0]}"

# tilt舵机顺时针旋转90°,pan舵机处于原位
$ ros2 topic pub --once /wxxmd/commands/joint_group interbotix_xs_msgs/msg/JointGroupCommand "{name: 'all', cmd: [0, 1.57]}"
  • pan舵机的限位范围为[-3.14, 3.14]tilt舵机的限位范围为[-1.57, 1.57]

演示视频

<iframe height=498 width=100% src="//player.bilibili.com/player.html?isOutside=true&aid=113603596256593&bvid=BV1y2ieYKEWr&cid=27201833269&p=1&high_quality=1&danmaku=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>

纠错,疑问,交流: 请进入讨论区请点击进入页面,扫码加入微信群或Q群进行交流

获取最新文章: 扫一扫加入“创客智造”公众号


标签: none