{"id":21103073,"url":"https://github.com/robotnikautomation/safety_module","last_synced_at":"2025-08-26T07:11:05.177Z","repository":{"id":44664541,"uuid":"214420992","full_name":"RobotnikAutomation/safety_module","owner":"RobotnikAutomation","description":"ROS package to interact with the safety module via modbus","archived":false,"fork":false,"pushed_at":"2024-11-03T00:00:16.000Z","size":127,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"ros","last_synced_at":"2024-11-03T01:16:09.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobotnikAutomation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-11T11:40:27.000Z","updated_at":"2024-02-23T09:28:48.000Z","dependencies_parsed_at":"2024-04-29T10:30:44.908Z","dependency_job_id":"1a17ef2a-0bd0-4f86-a329-0ed15817a98c","html_url":"https://github.com/RobotnikAutomation/safety_module","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotnikAutomation%2Fsafety_module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotnikAutomation%2Fsafety_module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotnikAutomation%2Fsafety_module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobotnikAutomation%2Fsafety_module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobotnikAutomation","download_url":"https://codeload.github.com/RobotnikAutomation/safety_module/tar.gz/refs/heads/ros","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225444587,"owners_count":17475354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T23:57:36.888Z","updated_at":"2024-11-19T23:57:37.364Z","avatar_url":"https://github.com/RobotnikAutomation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Safety_module\n\nNode that interacts with the Flexisoft Safety Module via Modbus protocl\n\n## 1.Dependencies\n\n### 1.1 ROS dependencies\n\n* [robotnik_msgs](https://github.com/RobotnikAutomation/robotnik_msgs)\n* [robotnik_modbus_io](https://github.com/RobotnikAutomation/robotnik_modbus_io): The communication with modbus id done through this node\n\n## 2. Start-up\n\nFirst, you need robotnik_modbus_io node running (check that the IP is correct)\n\n`roslaunch robotnik_modbus_io robotnik_modbus_io.launch`\n\nAfter that, run the node:\n\n`roslaunch safety_module safety_module_node.launch`\n\n## 3. Params\nMost params are to configure modbus addresses and I/O numbers.\n\n* **desired_freq**(double)\n\n* **address_registers**: list of all the addresses to work with registers\n    * **laser_mode_output**(unsigned int): writes the desired laser mode\n     * **current_speed**(unsigned int): writes the current robot speed\n\n\n* **outputs**: list of the standard outputs to interact with module\n    * **standby**(unsigned int): sets the lasers and safety module into standby, disabling power in motors and scans\n    * **watchdog_signals**(array of two unsigned int): sets a quadratic signal that allows the Flexisoft module to know that the controller is alive. Otherwise it disables power. Setting an empty array [] means to disable the publication of the signal.\n    * **emergency_stop_sw**(unsigned int): causes E-Stop hardware equivalent\n\n* **lasers_mode**: available configuration for the lasers safety mode. By default \"standard\". Example:\n``` \n  standard:     #  custom name of the mode\n    input: 237  # input to read the mode\n    output: 0   # value of the register when writing in the modbus address for the lasers mode\n```\n\n* **custom_outputs**: list of custom outputs mapped and tagged for specific applications\n\n\n* **inputs**: list of inputs read from the module\n    * **emergency_stop** \n    * **auto_mode** \n    * **emergency_mode** \n    * **manual_mode** \n    * **safety_overrided** \n    * **safety_stop** \n    * **standby** \n    * **wheels_power_enabled** \n    * **laser_ok** \n    * **edm_fault** \n    * **emergency_stop_fault** \n    * **motion_enabled** \n    * **emergency_stop_sw** \n    * **watchdog_ok** \n    * **lasers**\n        * **front**:\n            * detecting_obstacles: True if there's an obstacle in the stop area\n            * contamination_led: \n            * reset_pressed: \n            * free_warning: \n        * **rear**:\n            * detecting_obstacles: \n            * contamination_led: \n            * reset_pressed: \n            * free_warning: \n\n* **custom_inputs**:\n\n\n**watchdog_signals_frequency**(double): frequency to write the quadratic signal to keep the module\n**set_speed_feedback_to_safety_module**(bool): sets the current speed to the safety module\n\n## 4. Topics\n\n### 4.1 Publishers\n * **~/safety_module/emergency_stop [std_msgs/Bool]**\n * **~/safety_module/named_io [robotnik_msgs/named_inputs_outputs]**\nIt publishes the current state of all the signals, the standard and custom ones. \n```\ndigital_inputs: \n  - \n    name: \"wheels_power_enabled\"\n    value: True\n  - \n    name: \"watchdog_ok\"\n    value: False\n  - \n    name: \"edm_fault\"\n    value: False\n  - \n    name: \"battery_ok\"\n    value: True\n  - \n    name: \"elevator_down\"\n    value: False\n  - \n    name: \"elevator_up\"\n    value: False\n  - \n    name: \"charge_photocell_fault\"\n    value: True\n  - \n    name: \"selector_fault\"\n    value: False\n  - \n    name: \"laser_ok\"\n    value: True\n  - \n    name: \"emergency_stop_fault\"\n    value: False\n  - \n    name: \"emergency_stop_sw\"\n    value: False\n  - \n    name: \"motion_enabled\"\n    value: True\n  - \n    name: \"ready_to_swap_batteries\"\n    value: False\ndigital_outputs: \n  - \n    name: \"release_battery\"\n    value: False\n  - \n    name: \"block_battery\"\n    value: False\n  - \n    name: \"emergency_stop_sw\"\n    value: False\n```\n\n * **~/safety_module/safety_stop [std_msgs/Bool]**\n It publishes true if the safety is triggered.\n \n * **~/safety_module/speed_feedback [std_msgs/Int32]**\n Current speed being sent to the module.\n \n * **~/safety_module/state [robotnik_msgs/State]**\n Current component state\n \n``` \nstate: 300\ndesired_freq: 5.0\nreal_freq: 4.99675226212\nstate_description: \"READY_STATE\"\n```\n\n * **~/safety_module/status [robotnik_msgs/SafetyModuleStatus]**\n    This one gives you the status of the module\n\n```\nsafety_mode: \"safe\"\ncharging: False\nemergency_stop: False\nsafety_stop: True\nsafety_overrided: False\nlasers_on_standby: False\nlasers_mode: \n  name: \"standard\"\nlasers_status: \n  - \n    name: \"front\"\n    detecting_obstacles: False\n    contaminated: False\n    free_warning: False\n  - \n    name: \"rear\"\n    detecting_obstacles: False\n    contaminated: False\n    free_warning: False\n``` \n \n * **~/safety_module/watchdog_signals [robotnik_msgs/BoolArray]**\n Current value of the signals sent to the module. For debugging\n\n### 4.2 Subscribers\n\n * **/base/odom [nav_msgs/Odometry]**\n    * Receives the odometry from the robot\n * **/base/robotnik_modbus_io/input_output [robotnik_msgs/inputs_outputs]**\n    * Receives the current IO modbus state\n\n\n### Services\n\n * **~/safety_module/set_laser_mode [robotnik_msgs/SetLaserMode]**\n Sets the current laser mode based on internal configuration.\n Modes available: standard, docking_station\n This modes will change the laser detection ranges\n \n * **~/safety_module/set_named_output [robotnik_msgs/SetNamedDigitalOutput]**\n Sets any of the named digital outputs set in configuration.\n \n * **~/safety_module/set_to_standby [std_srvs/SetBool]** \n Puts the module on standby, disabling power and the lasers.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotnikautomation%2Fsafety_module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotnikautomation%2Fsafety_module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotnikautomation%2Fsafety_module/lists"}