1 Star 0 Fork 0

Dapenson / moveo_ros

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

moveo_ros

ROS packages that can be used to plan and execute motion trajectories for the BCN3D Moveo robotic arm in simulation and real-life.

Video Demo Here!

  • New Feature: Object-Specific Pick and Place (With an ordinary webcam, Tensorflow, OpenCV, and ROS, you can 'pick and place' (or sort) objects that are detected in real-time)

How to Use:

Getting the BCN3D Simulation Working with Motion Planning

moveit_screenshot.png

  1. Make sure you have ROS installed correctly with a functioning workspace-- I used ROS Kinetic on Ubuntu 16.04 (if you have a different distro, you may need to change some things). I currently have 'moveo_ros' in the 'src' folder of my catkin workspace.

  2. To plan and execute trajectories for the Moveo in simulation (RVIZ with Moveit plugin), execute the following terminal command:

    roslaunch moveo_moveit_config demo.launch
  3. Once the window loads, in the bottom-left corner check "Allow Approximate IK Solutions." Then click on the "Planning" tab in the MotionPlanning panel of RVIZ. Select a new goal state by either dragging the interactive marker (light blue ball on the end effector) or under "Select Goal State." Once goal state is updated, "Plan and Execute" will plan and execute the trajectory from the start state to the updated goal state.

Moving the real robot, synced with the simulated robot's trajectories.

  1. Make sure you download the AccelStepper (AccelStepper Library Download) and ros_lib (rosserial-arduino tutorial) libraries into your Arduino environment.

    • If ros_lib already exists in your Arduino libraries (/libraries), follow the last troubleshooting tip or you'll get an error saying "ArmJointState.h: no such file". ROS makes you remove ros_lib and regenerate it every time you introduce a new custom message.
  2. Change the pin layout between your robot and the RAMPS 1.4 in 'moveo_moveit_arduino.ino' and upload the file to your Arduino (I'm using MEGA 2560). Make sure the robot and the simulation are in the same position (to set the simulation upright initially-- select "Upright" from "Select Goal States" in RVIZ.

  3. In 'moveit_convert.cpp' replace the stepsPerRevolution array with the steps/revolution (or microsteps/revolution) of each of your motors. (Note: if you don't already know these values, you can experimentally get how many microsteps/revolution your motors have using the MultiStepperTest.ino and recording/eyeballing the results)

  4. With the simulation already running, execute each of the following commands in it's own, separate terminal:

    • rosrun rosserial_python serial_node.py /dev/ttyUSB0(establishes rosserial node that communicates with Arduino)
    • rosrun moveo_moveit moveit_convert (converts simulation joint_state rotations to steps and publishes on the /joint_steps topic, which the Arduino script subscribes to)
    • rostopic pub gripper_angle std_msgs/UInt16 <angle 0-180> (publishes gripper_angle)

Now, whatever trajectories are planned and executed in simulation are echoed on the real robot.

About Directories

moveo_urdf

Contains the URDF (Unified Robot Description File) for the BCN3D Moveo. Necessary for simulation in RVIZ and moveit configuration.

moveo_moveit_config

Configuration for moveit, a motion planning framework that has a plugin in RVIZ, which is what we are using here.

moveo_moveit

  • moveit_convert.cpp: Converts simulation 'joint_state' rotations (from the 'move_group/fake_controller_joint_states' topic) to steps and publishes on the /joint_steps topic. Joint_steps is an array of 6 Int16 values (though we only have 5 joints in this case) that represent the accumulated steps executed by each joint since the moveit_convert node has started running.

  • move_group_interface_coor_1.cpp: Can hardcode a pose/position for the end effector in the script and plan/execute a trajectory there. Also reads/outputs the current pose/position of the end effector.

Troubleshooting

  • After step 7, there should be 3 new topics created:

    • /joint_steps: steps necessary to move each motor to desired position
    • /joint_steps_feedback: same as /joint_steps, except published back by arduino to check that information is being received by Arduino correctly
    • /gripper_angle: current angle of the gripper
  • To move Moveo from the command line:

    • rostopic pub joint_steps moveo_moveit/ArmJointState <Joint1 Joint2 Joint3 Joint4 Joint5 0>
    • Change "Joint1, Joint2, etc." to the number of steps you want each joint to move.
  • Use rostopic list and search for these topics to check if they are currently running

  • Use rostopic echo /<topic> to view the data on <topic> in your terminal

  • If you get the following "error: moveo_moveit/ArmJointState.h: No such file or directory", perform the following steps in terminal:

     cd <Arduino sketchbook>/libraries
     rm -rf ros_lib 
     rosrun rosserial_arduino make_libraries.py .
  • Here is my current layout and wiring schematic for reference: aerialRobotSketch.pdf

MIT License Copyright (c) 2018 Jesse Weisberg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

ROS packages and Arduino scripts that can be used to control the BCN3D Moveo robotic arm in simulation and real-life. 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/x223222981/moveo_ros.git
git@gitee.com:x223222981/moveo_ros.git
x223222981
moveo_ros
moveo_ros
master

搜索帮助