Starting with ROS on the Robot¶
Connecting your PC to the platform via the middleware¶
By default, all distributions of ROS 2 use Fast-RTPS as the middleware. We will continue to support the default middleware and will make the changes according to the developments of Open Robotics.
Connecting to the PC and the robot has already been discussed in Getting Started.
ROS 2 in general uses the Domain ID to distinguish between groups of computers running on the same network. By default, we set all the domain IDs of our robots to
0, which is also the factory default configuration of ROS 2.
If changes are required, then the user has to add the following line to the
~/.bashrc of his client PC as well as the robot PC.
The above setting will only work for devices connected to the same network, i.e. technically having the same subnet mask.
Testing your connection¶
In general, when you turn on your new robot, there is an autostart script for ROS that would bring up all the necessary drivers and packages for the hardware components as part of the robot. If you followed the automated workspace setup instructions in Installation, then the autostart script would already be part of the robot’s desktop.
If, on the other hand, you have installed ROS 2 and other necessary packages manually, then you need to do a manual startup as follows:
MP / MM robots¶
ros2 launch neo_mpo_700-2 bringup.launch.py
ros2 launch rox_bringup bringup.launch.py rox_type:=argo
After completing the ROS network configuration your PC should be able to connect to the ROS on the platform. To check the connection you can try to list the available topics:
If you are changing the relayboard configs, it is always essential to turn the key towards the “on” direction, once after the ROS bringup as been initiated. The indications can be seen with the LED’s if they are present. The robot will not move without the key being turned.
ros2 topic list
It should show the topics as follows:
MP / MM robots¶
/cmd_vel /diagnostics /drives/joint_states /drives/joint_states_raw /drives/joint_trajectory /joint_states /joy /joy/set_feedback /lidar_1/scan /lidar_1/scan_filtered /lidar_2/scan /lidar_2/scan_filtered /odom /relayboard_v2/battery_state /relayboard_v2/emergency_stop_state /relayboard_v2/state /rosout /rosout_agg /tf /tf_static
Some of the scanner topics are omitted here. Please look into the documentation from sick for more details.
/cmd_vel /diagnostics /drives/joint_states /drives/joint_states_raw /drives/joint_trajectory /joint_states /joy /joy/set_feedback /kinematics_state /lidar_1/scan /lidar_1/scan_filtered /lidar_2/scan /lidar_2/scan_filtered /odom /battery_state /emergency_stop_state /relayboard_v3/state /safety_state /scan /rosout /rosout_agg /tf /tf_static
If you have IMU enabled, then you’ll be able to see few more topics published as described in the documentation of the phidget_drivers
More about bringup¶
The bringup component that we saw earlier is the heart of our software stack, as this starts and configures all the necessary hardware components which are part of our robot. The launch of the bringup comes with additional arguments. The launch arguments are described below:
MP / MM robots¶
Starting from July 2023, the complete namespacing support is currently only avaiable for MP-400 and partially for MPO-700. The rest will be updated soon.
|namespace||NaN (Format: string)||sets the robot namespace|
|imu_enable||False (Format: Bool)||Enables / Disables IMU|
Setting up an IMU or any other customization can be seen in Customization for ROS 2.
The launch prompt for the commandline with both the option set, will be something like this:
ros2 launch neo_mpo_700-2 bringup.launch.py namespace:="robot1" imu_enable:=True
More about the namespacing can be learnt in the documentation for Namespacing Guide.
The packages for ROX will be updated frequently. The support for various software components and the hardware components will be slowly made available in the forthcoming updates. Please contact us directly incase if there is an update that is required immediately.
|rox_type||NaN (Format: string)||sets the kinematics type|
Visualize the data with RViz¶
A pre-configured visualization can be started via a launch file from your Client-PC as follows:
MP / MM robots¶
ros2 launch neo_mp_400-2 rviz.launch.py robot_namespace:=robot1 use_namespace:=True ros2 launch neo_mp_500-2 rviz.launch.py ros2 launch neo_mpo_500-2 rviz.launch.py ros2 launch neo_mpo_700-2 rviz.launch.py
ros2 launch rox_rviz rox_rviz_launch.py
Joystick node is already initialized in the bringup. The Logitech joystick should be operable at this point.
You can use the left stick for movement in X and Y direction and the right stick for rotating. Please make sure to set the joystick to D-mode (found on the top) before teleop.
It is always essential to manually move the axes of the joystick in all possible directions, before pressing the deadman button and starting the teleoperation of the robot. Please read this issue about the teleop for more information.
MP-400 and MP-500 cannot move in Y direction.