Set Parameter Block from Robotics System Toolbox doesn't change parameters in Gazebo. How should I make it work?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I have an empty world loaded into gazebo from roslaunch as follows: roslaunch myrobot myrobot_empty.world which loads following world into gazebo:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164379/image.png)
As you can see gravity in z direction is -9.8. I have created following simulink block from Robotics System Toolbox to change the value of gravity in z direction:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164381/image.png)
As you can see, upon running this simulink block, gravity in z-direction should change to -7.8 since I am adding 2 to -9.8, but it doesn't do anything. How should I make it work?
댓글 수: 0
답변 (1개)
Sebastian Castro
2017년 9월 19일
This is unfortunately not a MATLAB/Simulink specific problem.
I have tried the same approach from a Linux terminal, where I was trying to use the following command:
rosparam set /gazebo/gravity_z 0.1
Even though getting the parameter back in the terminal returns my new value of 0.1, the Gazebo UI still shows the original gravity of -9.8. I'm not sure why this is the case...
- Sebastian
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!