Skip to content

HarvestX/MG400_ROS2

Repository files navigation

License

MG400_ROS2

Dobot MG400 ROS2 Repository.

Image

Repository Status

ROS2 Distro Branch Build status
humble humble ci_humble

Requirements

Install

Locate package in workspace

mkdir -p ~/ws_ros2/src
cd ~/ws_ros2/src
git clone [email protected]:HarvestX/MG400_ROS2.git

Run script to install dependencies

source /opt/ros/$ROS_DISTRO/setup.bash
cd ~/ws_ros2/src/MG400_ROS2
./setup.bash
exec -l $SHELL

Build Source

Open new terminal and type followings.

source /opt/ros/$ROS_DISTRO/setup.bash
cd ~/ws_ros2
colcon build

Connect to MG400

Connect PC and MG400 to the same Ethernet via LAN cable. MG400 needs the emergency stop switch.

IP address settings

Set the PC's Ethernet IPv4 IP address to a fixed IP somewhere on 192.168.1.0/24 other than 192.168.1.6.

No need to fill in the "Gateway" and "DNS".

Image

Check the circle light on the base of MG400 blink blue.

Launch ROS2 Packages

Before launch MG400 scripts, open new terminal and type followings.

source ~/ws_ros2/install/setup.bash

Launch display (It works without hardware.)

This command display the robot state with Rviz2. MG400 has parallel links, so the custom joint state publisher is used.

ros2 launch mg400_bringup display.launch.py

Launch main system (MG400 should be connected via LAN cable.)

This command will start service server to operate MG400 via ROS2 service.

ros2 launch mg400_bringup main.launch.py

Available services are listed here.

Test the sample program

Launch main system with other terminal. Allow enough space around the robot as it moves.

./sample.bash

Running Utilities

TCP Packet Checker

ros2 run mg400_interface show_realtime_data

References

Official ROS1 package