Notes:
Make sure that
Atom
is flashed into the top Atom andTransponder
is flashed into the base Basic .The tool download address: https://github.com/elephantrobotics/myCobot/tree/main/Software
ubuntu: 16.04LTS
ros version: 1.12.17
If your Atom
is 2.3 or before, or pymycobot
is 1.*, Please check branch before
Download ROS http://wiki.ros.org/ROS/Installation
There are two ways to run this project. The first is by running the project in a container, and this requires installing docker and installing docker-compose. The benefit of running in the container is that you can run the project in any version of linux, as long as your kernel is new enough.
Once docker is installed, run the following command, and the project should show up:
docker-compose build ros && xhost +local:root && docker-compose up ros
This command does three things:
-
docker-compose build ros
This builds the project in a container. That means nothing is installed on your host machine! The first time this runs, this command will take a long while. After running it once, caching will allow this command to run quickly.
-
xhost +local:root
This command gives X the ability to display GUI's from within the docker container
-
docker-compose up ros
This runs the image specified in the
docker-compose.yml
, which by default runs the commandroslaunch myCobotROS control_slider.launch
within the container.
For using this package, the Python api library should be installed first.
pip install pymycobot --user
Install ros package in your src folder of your Catkin workspace.
$ cd ~/catkin_ws/src
$ git clone https://github.com/elephantrobotics/myCobotROS.git
$ cd ~/catkin_ws
$ catkin_make
$ source ~/catkin_ws/devel/setup.bash
cd ~/catkin_ws/src/myCobotROS
python scripts/test.py
display
is a display node. When the node is running, the model of ROS will show the movement of mycobot synchronously.control_slider
is the node which slider bar control.control_marker
is the node which use interactive marker control.
-
joint_states
- control mycobot status.Message_type: std_msgs/JointState Data: position[float, float, float, float, float, float]
-
Visualization -- display.launch: This function will display robot arm movement in realtime when you manually move mycobot.
-
Control -- control.launch: This function will allow you use slider bar to control movement of the robot arm.
-
Use slide bar to control
- launch ros and rviz
roslaunch myCobotROS control_slider.launch
- run python script
rosrun myCobotROS control_slider.py
-
The model moves with the real manipulator
- launch ros and rviz
roslanuch myCobotROS mycobot.launch
- run python script
rosrun myCobotROS display.py
Q: error[101]
A: Make sure that the serial port is not occupied, and that the correct firmware is burned in for atom and basic