Installation and Getting Started Guide
Follow these steps to install and get started with the robot-sensor
repository:
Prerequisites
Ensure you have the following installed on your system:
- Git: Download and install Git
- Python 3.8+: Download and install Python
-
pip: Comes pre-installed with Python, or install it using
python -m ensurepip --upgrade
- ROS2: Humble: Install ROS2 Humble
Installation
-
Clone the Repository:
git clone https://git-ce.rwth-aachen.de/rene.ebeling/robot-sensor.git
-
Install Dependencies:
cd ~/robot-sensor/Install_Documentation/
pip install -r /requirements.txt
-
Build the Workspace:
cd ~/robot-sensor/workspaces/COLCON_WS
colcon build
-
Source the Workspace and ROS2 installation: Ensure you are in the COLCON_WS Directory
source install/setup.bash
source /opt/ros/${ROS_DISTRO}/setup.bash
-
Install the Universal Robots driver and replace the ur_description package in
/opt/ros/humble/share/
wtth the custom made one from the repository:sudo apt-get install ros-${ROS_DISTRO}-ur
sudo rm -r /opt/ros/${ROS_DISTRO}/share/ur_description
sudo cp -r ~/robot-sensor/workspaces/COLCON_WS/src/ur_description /opt/ros/${ROS_DISTRO}/share/
-
Now start the ur_robot_driver with the following comand:
ros2 launch ur_robot_driver ur_control.launch.py ur_type:=ur10 robot_ip:=<IP_from_your_robot>
-
Afterwards we gonna launch the MoveIt2 configuration with the following command:
ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur10 launch_rviz:=true
Troubleshooting
- If you encounter issues, ensure all prerequisites are installed correctly.
- Check for missing dependencies or version mismatches.
- Use the
--show-args
flag with ROS2 commands to display the arguments and options available for a specific launch file or node. This can help debug or understand the configuration better.
Additional Troubleshooting Tools and Flags
-
--ros-args
: Use this flag with ROS 2 commands to pass additional arguments or parameters to nodes. For example:ros2 run <package_name> <node_name> --ros-args -p <parameter_name>:=<value>
-
ros2 topic echo
: Monitor the messages being published on a specific topic. This is useful for debugging communication between nodes.ros2 topic echo /<topic_name>
-
ros2 topic list
: List all active topics in the ROS 2 system to ensure the expected topics are being published. -
ros2 node list
: Display all active nodes in the system to verify that the required nodes are running. -
ros2 param list
: List all parameters for a specific node to check if they are set correctly.ros2 param list /<node_name>
-
ros2 param get
: Retrieve the value of a specific parameter for a node.ros2 param get /<node_name> <parameter_name>
-
ros2 service list
: List all available services to ensure the required services are active. -
ros2 service call
: Call a service to test its functionality.ros2 service call /<service_name> <service_type> "{<arguments>}"
-
colcon test
: Run tests in your workspace to verify that your packages are functioning as expected. -
colcon test-result
: Check the results of the tests run withcolcon test
. -
rqt
: A graphical user interface tool for visualizing and debugging ROS 2 systems. Install it using:sudo apt-get install ros-${ROS_DISTRO}-rqt
-
rqt_graph
: Visualize the node and topic connections in your ROS 2 system. Launch it with:rqt_graph
-
rviz2
: A powerful visualization tool for ROS 2. Use it to debug robot states, sensor data, and more. -
Log Levels: Adjust the log level of nodes to get more detailed output for debugging. For example:
ros2 run <package_name> <node_name> --ros-args --log-level debug
-
Environment Variables: Use environment variables like
ROS_DOMAIN_ID
to isolate your ROS 2 network orRMW_IMPLEMENTATION
to switch between middleware implementations. -
ros2 doctor
: A diagnostic tool to check the health of your ROS 2 installation.ros2 doctor
Additional Resources
For more detailed documentation and support, refer to the following resources:
-
Universal Robots ROS 2 Documentation: Comprehensive guide for integrating Universal Robots with ROS 2.
Universal Robots ROS 2 Documentation -
PyMoveIt2 GitHub Repository: A Python interface for MoveIt2, useful for understanding how to control robots with Python nodes.
PyMoveIt2 GitHub Repository -
ROS 2 Tutorials: Official tutorials for ROS 2 Humble, covering a wide range of topics from beginner to advanced.
ROS 2 Tutorials -
GitHub Issues: If you encounter any problems or have questions, open an issue on the GitHub Issues page.