ros2_control - rolling
Loading...
Searching...
No Matches
Functions
mujoco_ros2_control::detail Namespace Reference

Functions

template<int N>
Eigen::Matrix< double, N, 1 > sample_noise (double stddev, NoiseDistribution distribution, std::mt19937 &rng)
 Fills an N-vector with independent zero-mean noise samples of the given standard deviation and shape, constructing the underlying distribution once and drawing all N samples from it.
 
bool handle_render_loop_exit (std::atomic< int > &exit_request, const std::atomic< bool > &explicit_shutdown_requested, const std::shared_ptr< rclcpp::Context > &context)
 

Detailed Description

Copyright (c) 2026, Dylan Gallagher.

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.

Function Documentation

◆ sample_noise()

template<int N>
Eigen::Matrix< double, N, 1 > mujoco_ros2_control::detail::sample_noise ( double  stddev,
NoiseDistribution  distribution,
std::mt19937 &  rng 
)
inline

Fills an N-vector with independent zero-mean noise samples of the given standard deviation and shape, constructing the underlying distribution once and drawing all N samples from it.

Uniform noise is drawn from [-stddev*sqrt(3), stddev*sqrt(3)] (the range of a uniform distribution whose own standard deviation is stddev), so switching a sensor's noise_distribution doesn't change the magnitude implied by its MJCF noise value.