伯克利大学sawyer机器人环境配置
https://docs.google.com/document/d/1JBKPye4ABGBVQqj6RPL5yw3IKBhpO4FJIZoLzzP0d5Q/edit
Hardware Setup:
建议在sawyer前面放一个箱子,这样sawyer就可以轻松地把手腕弯下来到达所有的地方。我们的箱子长宽都是50厘米,并且有倾斜的角度来帮助物体回到中心(如下图所示)。我们还成功地使用了一个更大的没有倾斜角度的木箱。
对于摄像头,建议购买罗技C920(或类似的)消费型摄像头,并将其布置在机器人周围的一个环中。它应该可以看到机器人从每个视图和大部分(如果不是全部)的工作空间。图中的设置有5个摄像头,但您可以使用不同数量的摄像头作为方便。
我已经附上了示例STL文件的wsg夹具手指,相机支架(我们使用它来牢固地连接网络摄像头),和wsg-50夹具电缆支架在这里here。
Software Setup:
- 在ros工作区中克隆存储库并检查dev分支。
a. 克隆后,请将private_visual_prespective重命名为visual_prespective.
b. 下载完成后,python setup.py develop
(你在这步可能需要 sudo ) - 向ROS register the repo并运行摄像头节点
cd~/ros_ws&&catkin_make-DCMAKE_BUILD_TYPE=RELEASE
- 为您的特定robot编写一个类来扩展RobotController接口。如需帮助,请参阅此处的sawyer代码
a. 一旦你的class被写出来,把它添加到get_controller_class类中,以便于导入。 - 配置机器人操作空间(仅供参考,目前仅支持矩形工作区)
a. 您需要找到工作空间的最大/最小x、y、z值以及最大/最小偏航(夹持器手腕旋转)值。
b. 使用get_points.py脚本以轻松找到机器人的当前末端效应器姿势,姿势将包含上述值。
c. (可选)使用 record_motion.py 用于记录机器人动作的pickle文件的实用程序。这可用于redistribute_action 原语(aka automatic object sweep-back) - Start the cameras
a. start_cameras.py提供了一个简单的实用程序来启动网络摄像头并使用opencv发布到命名主题
b. 使用–cam_order指定设备id顺序(计算机注册您的cam的顺序),使用–topic_name指定摄像头主题(人类可读的ros_主题名称) - 为数据收集创建一个实验文件示例。如果上一部分你做得对,你要做的就是:
a. Add a ‘robot’: ‘<robot_type’ tag to the env_params dict
b. Change the configuration json file to match your setup
c. (Optional) Change the number of cameras/pre-processing by modifying ‘camera_topics’ tag - (Optional) if you specified the ‘email_login_creds’ tag above you will receive email updates when collection starts/stops and log files in the event of a crash.
a. To configure create a credential file bytouch .email_cred
b. Populate the file with a json dict as below:
{
“address” : <sender’s gmail address>,
“password”: <sender’s password>,
“receivers”: [“list”, “of”, “receiver”, “email”, “addresses”]
}
c. We only support gmail senders right now. You must allow less secure apps on the sender in order for this to work - Run
rosrun foresight_rospkg run_robot.py <robot_name> <path to data collection path> -r
a. You will likely want to save in a different directory outside of the ros workspace (avoid ROS slowdown due to file indexing). If so specify the RESULT_DIR environment value withexport RESULT_DIR=<PATH>