To simulate, it is crucial to first have ROS 2 properly installed and the environment prepared. If you do not have an environment set up, create a script named ros2_setup.sh
. Copy and paste the following code into the script, and place the ros2_setup.sh
script in the Home directory on your computer.
source /opt/ros/humble/setup.bash
source /usr/share/colcon_cd/function/colcon_cd.sh
export _colcon_cd_root=~/ros2_install
export ROS_DOMAIN_ID=40
source ~/wsr2/install/setup.bash
cd ~/wsr2
First the installation of ROS2
Request access to engineer Carlos Araya Jiménez for the Dexterous Assymetric End Effector
repository, clone to the src
directory withinwsr2
.
git clone git@gitlab.com:arcoslab/masters/2021_2022/carlosaraya/dexterous-assymetric-end-effector.git
Remember: Make sure you have your SSH keys configured in your GitLab account for authentication to work correctly.
It is important from time to time to apply the following command.
sudo apt upgrade
Step 1
source ros2_setup.sh
Step 2
colcon build --packages-select dexterous_assymetric_end_effector_sim
Step 1
cd
Step 2
source ros2_setup.sh
Step 3
rviz2
Step 1
cd
Step 2
source ros2_setup.sh
Step 3
ros2 launch dexterous_assymetric_end_effector_sim dexterous_assymetric_end_effector_sim.launch.py
Step 1
Fixed Frame - odom
Step 2
Add - RobotModel - OK
Step 3
Description Topic - /robot_description
Step 4
Ready-to-use RViz interface
To move the collaborative robot manually with the send_commands.py
script after you have configured the ARviz interface normally, in another terminal:
Step 1
cd
Step 2
source ros2_setup.sh
Step 3
cd /home/<user>/src/dexterous-assymetric-end-effector/dexterous_assymetric_end_effector_sim/dexterous_assymetric_end_effector_sim
Step 4
python3 send_commands.py --ros-args --remap send_commands/command_out:=/test/dexterous_assymetric_end_effector_sim/in
Create the run_send_commands.sh
script on the Home page of your computer, copy the following code and paste it into the run_send_commands.sh
script.
#!/bin/bash
# Colcon build
source ~/ros2_setup.sh
colcon build
# Run the Rviz2
gnome-terminal --title="RViz" -- bash -c "source ~/ros2_setup.sh; rviz2; exec bash"
# Run the ROS launch
gnome-terminal --title="Collabot" -- bash -c "source ~/ros2_setup.sh; ros2 launch dexterous_assymetric_end_effector_sim dexterous_assymetric_end_effector_sim.launch.py; exec bash"
# Run the move keyboard
gnome-terminal --title="Move Keyboard" -- bash -c "source ~/ros2_setup.sh; cd /home/angeles/wsr2/src/dexterous-assymetric-end-effector/dexterous_assymetric_end_effector_sim/dexterous_assymetric_end_effector_sim; python3 send_commands.py --ros-args --remap send_commands/command_out:=/test/dexterous_assymetric_end_effector_sim/in; exec bash"
Then open the terminal:
Step 1
cd
Step 2
./run_send_commands.sh
Then configure the RViz
interface normally.
Robot with terminal to move it with the keyboard