![]() |
ros2_control - humble
|
Classes | |
| struct | FTSensorData |
| class | HeadlessAdapter |
| struct | IMUSensorData |
| struct | InterfaceData |
| struct | MuJoCoActuatorData |
| class | MujocoSimulation |
| ROS 2-based container for the mujoco Simulate application. More... | |
| class | MujocoSystemInterface |
| class | ROS2ControlGlfwAdapter |
| struct | SensorData |
| struct | URDFJointData |
Enumerations | |
| enum class | ActuatorType { UNKNOWN , MOTOR , POSITION , VELOCITY , PASSIVE , CUSTOM } |
Functions | |
| std::pair< std::string, std::string > | compose_sim_display_text (bool running, uint64_t step_count, double sim_time, double desired_pct, double actual_pct, int ncon) |
| Composes the title/content text pair for the native-viewer status overlay. | |
| std::optional< hardware_interface::ComponentInfo > | get_sensor_from_info (const hardware_interface::HardwareInfo &hardware_info, const std::string &name) |
| Returns the sensor's component info for the provided sensor name, if it exists. | |
| template<typename T > | |
| void | add_items (std::vector< T > &vector, const std::vector< T > &items) |
| ActuatorType | getActuatorType (const mjModel *mj_model, int mujoco_actuator_id) |
| int | get_actuator_id (const std::string &actuator_name, const mjModel *mj_model) |
| Get the MuJoCo actuator ID based on a name. First this method looks for a joint that matches the passed name, and finds the actuator attached to it. If this doesn't exist, it will then look for the actuator with the passed name. | |
| std::string | get_joint_actuator_name (const std::string &joint_name, const hardware_interface::HardwareInfo &hardware_info, const mjModel *mj_model) |
| Get the corresponding actuator name for a given joint name using transmissions. | |
| std::vector< std::string > | get_interfaces_in_order (const std::vector< std::string > &available_interfaces, const std::vector< std::string > &desired_order) |
| Orders available interfaces based on a desired order. | |
Copyright (c) 2025, United States Government, as represented by the Administrator of the National Aeronautics and Space Administration.
All rights reserved.
This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2026, United States Government, as represented by the Administrator of the National Aeronautics and Space Administration.
All rights reserved.
This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2026 PAL Robotics S.L.
All rights reserved.
This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
strong |
Maps to MuJoCo actuator types:
|
inline |
Composes the title/content text pair for the native-viewer status overlay.
Extracted as a pure, dependency-free function so the overlay layout and number formatting can be unit tested without a live OpenGL/GLFW rendering context (the overlay itself is only drawn in non-headless mode). MuJoCo's overlay API renders the two strings side by side: each newline-separated row in title is paired with the row at the same position in the returned content string, so the two must always contain the same number of rows.
| running | Whether the physics loop is currently advancing. Drives the "Status" row ("Running"/"Paused"). |
| step_count | Number of physics steps taken so far (mjData step counter). |
| sim_time | Current simulation clock in seconds (mjData::time). |
| desired_pct | Target real-time percentage — either the UI slider value or the sim_speed_factor override, resolved by the caller. |
| actual_pct | Measured real-time percentage (100 / measured_slowdown). The caller passes 0 while paused. |
| ncon | Number of active contacts in the current step (mjData::ncon). |
| int mujoco_ros2_control::get_actuator_id | ( | const std::string & | actuator_name, |
| const mjModel * | mj_model | ||
| ) |
Get the MuJoCo actuator ID based on a name. First this method looks for a joint that matches the passed name, and finds the actuator attached to it. If this doesn't exist, it will then look for the actuator with the passed name.
| actuator_name | The name of the actuator. |
| mj_model | Pointer to the MuJoCo model. |
| std::vector< std::string > mujoco_ros2_control::get_interfaces_in_order | ( | const std::vector< std::string > & | available_interfaces, |
| const std::vector< std::string > & | desired_order | ||
| ) |
Orders available interfaces based on a desired order.
This function takes a list of available interfaces and a desired order, returning a new list where the interfaces are arranged according to the desired order. Any interfaces not specified in the desired order are appended at the end in their original order.
| available_interfaces | A vector of available interface names. |
| desired_order | A vector specifying the desired order of interface names. |
| std::string mujoco_ros2_control::get_joint_actuator_name | ( | const std::string & | joint_name, |
| const hardware_interface::HardwareInfo & | hardware_info, | ||
| const mjModel * | mj_model | ||
| ) |
Get the corresponding actuator name for a given joint name using transmissions.
| joint_name | The name of the joint. |
| hardware_info | The hardware information containing transmissions. |
| mj_model | Pointer to the MuJoCo model. |