To give it a try on simulation mode, launch:
ros2 launch smart_template robot.launch.py sim_level:=1 rviz:true
This repository contains:
- ROS2 package for communicating with the 3 DoF Smart Template
- The 3DoF Smart Template uses Galil Controller to control the position of the 3 motors
- ROS2 Foxy, Ubuntu 20.04 / ROS2 Humble, Ubuntu 22.04
- None
- '/stage/state/guide_pose', a PoseStamped with the current position of the template. It's refresh rate is given by the "timer_period"
- '/joint_states', a JointState with the current joint values of the template. It's refresh rate is given by the "timer_period"
- The template node exposes the /stage/move action which takes a /smart_template_interfaces/action/MoveStage action message of the format:
float64 x
float64 y
float64 z
float64 eps
---
float64 x
float64 y
float64 z
float64 time
float64 error
int32 error_code
---
float64 x
float64 y
float64 z
float64 error
float64 time
- The template node exposes the /stage/command service which takes a /smart_template_interfaces/srv/ControllerCommand action message of the format:
string command
---
string response
where command can be: 'HOME', or 'RETRACT' ('ABORT' still to be implemented)
- The template node exposes the /stage/get_position service which takes a /smart_template_interfaces/srv/GetPoint action message of the format:
---
float64 x
float64 y
float64 z
bool valid
where valid is False in case of communication error with Galil, and True otherwise
- robot.launch.py
- Argument: "sim_level"
- 1 - VIRTUAL ROBOT (FOR SIMULATION ONLY)
- 2 - REAL HARDWARE
- Argument: "rviz"
- false - NO rviz
- true - loads rviz
- Argument: "gui"
- false - NO rqt GUI custom plugin
- true - loads rqt GUI custom plugin
- Argument: "sim_level"
- Left-right (horizontal): x
- Anterior-posterior (vertical): z
- Inferior-superior (insertion): y
-
Setup the computer network to:
- IP: 192.168.0.9
- Subnet mask: 255.255.255.0
-
Galil commands using gclib:
- galil = gclib.py() #create communication
- galil.GOpen('192.168.0.99') #open communication
- galil.GCommand('XXXX') #Send command to Galil
- list of commands:
- DPX=Y Define the position Y in the axis X
- PTX Define the absolute motion mode in the axis X
- PAX=Y Send command to move the axis X to the position Y
- For more commands, check Galil docummentation