Skip to main content
Version: v3.0.0

luci_grpc_interface

Summary:

This is the primary package used in the SDK. This package also allows for the bidirectional transfer of information between LUCI and the ROS ecosystem. This package's node allows for you to read sensor data as well as send remote joystick commands to the system.

This package points at a LUCI gRPC server and operates on a multi-threaded approach which will grab all specified LUCI sensor streams then pass them through a message type conversion and then publish them on ROS topics.

You are likely to always use this node if using the LUCI SDK.

Use

To run a basic interface with no IR frames you need to run ros2 run luci_grpc_interface grpc_interface_node -a <chairs-ip-address>

To run the node while streaming IR frames add the -f flag followed by the rate you would like.

Example of streaming at 5fps per camera ros2 run luci_grpc_interface grpc_interface_node -a <chairs-ip-address> -f 5

Running Modes

There are 4 ROS services set up for the user. They can be used to set annd remove two drive modes which are Autonomous Remote and Shared Remote.

  • Autonomous Remote - This mode allows for a fully autonomous control of the chair by publishing a joystick messsage on the /luci/remote_joystick topic. The physical joystick wont stream any information and cant be used when this mode is activated. This mode can be set/remove by using ros2 service call /luci/<set/remove>_auto_remote_input std_srvs/srv/Empty. Note - While setting remote joystick, dont forget to set the input source to 1. If the input source is not set right, LUCI will disregard the command.
  • Shared Remote - This mode allows for a shared autonomous control of the chair. This mode will allow the user joystick to still stream on /luci/joystick_position topic. This allows for a shared autonomy where the input joystick data can be used for processing and new data to control the chair can be published on the /luci/remote_joystick topic. This mode can be set/remove by using ros2 service call /luci/<set/remove>_shared_remote_input std_srvs/srv/Empty. Note - While setting remote joystick, dont forget to set the input source to 5. If the input source is not set right, LUCI will disregard the command.
Notes:
  • The -f flag is optional and if nothing is passed in, the IR frames and the camera info will "stream" at 0 fps. You will not see the ros topics if the flag is not set.
  • The best way to see the IR frames is with foxglove. See the main LUCI SDK docs for more information.
  • Camera info topic streams camera intrinsics, traslations and rotation and can be checked by performing ros2 topic echo /luci/<camera_position>_camera_info where ros is sourced. The camera_position parameter can be left, right, rear.
  • The maximum frame rate that can be sent is 15fps. This is the rate LUCI cameras naturally stream at.
  • All requested frame rates are best effort requests. This means that LUCI will do its best to maintain the FPS but network and other factors may slow the actual observed rate. In addition any rate that is not cleanly divided into 15 will not be guaranteed. For example a rate request of 5 will be honored minus any network delay but a request of 7 will result in either 7 or 8 fps.
PackageNode
luci_grpc_interfaceluci_grpc_interface_node
ImplementedTopicsROS2 TypeMessage TypeDescription
yesluci/set_auto_remote_inputservicestd_srvs::srvs::EmptySets the input source to the autonomous remote source for joystick commands
yesluci/remove_auto_remote_inputservicestd_srvs::srvs::EmptyRemoves the autonomous remote joystick input source and set it to default
yesluci/set_shared_remote_inputservicestd_srvs::srvs::EmptySets the input source to the shared remote source for joystick commands
yesluci/remove_shared_remote_inputservicestd_srvs::srvs::EmptyRemoves the shared remote joystick input source and set it to default
yesluci/remote_joysticksubscriptionluci_messages::msg::LuciJoystickRemote joystick values used to drive the chair (front_back:xxx, left_right: xxx, joystick_zone: y, input_source: z). xxx range: [-100, 100], y range: [1, 8], input_source: [0, 5] NOTE - Publishing to this topic should be faster than 10Hz, or else chair will engage and disengage brakes constantly.
yesluci/joystick_positionpublisherluci_messages::msg::LuciJoystickJoystick values of the chair (front_back:xxx, left_right: xxx, joystick_zone: y, input_source: z). xxx range: [-100, 100], y range: [1, 8], input_source: [0, 5].
partiallyluci/odompublishernav_msgs::msg::OdometryAHRS odom reading
yesluci/imupublisherluci_messages::msg::LuciImuRaw IMU data from the LUCI system
yesluci/ultrasonic_pointspublishersensor_msgs::msg::PointCloud2Ultrasonic pointcloud
yesluci/radar_pointspublishersensor_msgs::msg::PointCloud2Radar pointcloud
yesluci/camera_pointspublishersensor_msgs::msg::PointCloud2Fused and Decimated pointcloud from all the LUCI cameras
yesluci/scalingpublisherluci_messages::msg::LuciScalingScaling percentage of each zone LUCI sees. [0, 1] output for each zone (percentage scaling)
yesluci/joystick_scalingpublisherluci_messages::msg::LuciJoystickScaled final Joystick values of the chair including the scaling applied
yesluci/encoderpublisherluci_messages::msg::LuciEncodersRaw Encoder data from the LUCI system

NOTE: The Following topics will only be published when -f Flag is set

ImplementedTopicsROS2 TypeMessage TypeDescription
yesluci/ir_left_camerapublishersensor_msgs::msg::ImageLeft camera’s IR frame
yesluci/ir_right_camerapublishersensor_msgs::msg::ImageRight camera’s IR frame
yesluci/ir_rear_camerapublishersensor_msgs::msg::ImageRear camera’s IR frame
yesluci/left_camera_infopublisherluci_messages::msg::LuciCameraInfoLeft camera’s IR frame meta data
yesluci/right_camera_infopublisherluci_messages::msg::LuciCameraInfoRight camera’s IR frame meta data
yesluci/rear_camera_infopublisherluci_messages::msg::LuciCameraInfoRear camera’s IR frame meta data

Removed Implementations

TopicsROS2 TypeMessage TypeDescription
removedluci/drive_modesubscriptionluci_messages::msg::LuciDriveModeMode of chair for drive controls (USER = user drives with joystick, ENGAGED = remote command drive the chair if user is holding joystick forward, AUTO = remote commands drive chair no matter what user is doing)

Future Implementations

TopicsROS2 TypeMessage TypeDescription
coming soonluci/chair_velocitypublishergeometry_msgs::msg::TwistLinear and angular velocity of the chair according to onboard AHRS Note: “linear velocity” will be speed not velocity
coming soonluci/all_sensor_pointspublishersensor_msgs::msg::PointCloud2Full pointcloud (All LUCI sensors)