sas
Modularised monitoring, logging, and control of robots.
Loading...
Searching...
No Matches
sas_robot_driver_ros_gazebo_node.cpp File Reference

Gazebo robot driver bridge, in C++. More...

#include <atomic>
#include <csignal>
#include <memory>
#include <rclcpp/rclcpp.hpp>
#include <sas_common/sas_common.hpp>
#include <sas_core/sas_shutdown_signaler.hpp>
#include <sas_robot_driver/sas_robot_driver_ros.hpp>
#include <sas_robot_driver_gazebo/sas_robot_driver_gazebo.hpp>

Functions

void sig_int_handler (int signal)
 SIGINT handler: request the node to shut down.
int main (int argc, char **argv)
 Run the Gazebo robot driver bridge.

Detailed Description

Gazebo robot driver bridge, in C++.

The C++ counterpart of scripts/sas_robot_driver_ros_gazebo.py, with the same parameters: a RobotDriverROS backed by the C++ RobotDriverGazebo.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

Run the Gazebo robot driver bridge.

Reads the node's parameters (joint_names, joint_positions_topic_prefix, joint_states_topic, robot_name, and optionally thread_sampling_time_sec, 0.002 s by default), constructs RobotDriverGazebo and a RobotDriverROS around it, and runs the driver's control loop until SIGINT.

Parameters
argcNumber of command-line arguments.
argvCommand-line arguments (ROS 2 arguments included).
Returns
0.

◆ sig_int_handler()

void sig_int_handler ( int signal)

SIGINT handler: request the node to shut down.

Parameters
signalThe signal number (unused).