본문 바로가기

전체 글

(16)
ROS2 humble에서 PointCloud2 메시지 변환 의존성 꼬임 이슈 라이다 회사에서 제공하는 ROS패키지에서 만들어내는 메시지 타입은 sensor_msgs::msg::PointCloud2인데, 2023년 1월 현재 "sudo apt-get install ros-humble-pcl-conversions"로 받아오는 헤더파일에는 sensor_msgs::msg::PointCloud2를 pcl::PointCloud로 바꿔주는 소스가 없다. 이 헤더파일로 컴파일을 하려고 하면 이런 에러메시지가 난다. note: cannot convert ‘_msg’ (type ‘const PCLMsgType’ {aka ‘const sensor_msgs::msg::PointCloud2_’}) to type ‘const PointCloud2&’ {aka ‘const sensor_msgs::Point..
Kicad 사용할 때 몇가지 메모... Spice모델을 해석할 때, BJT의 경우 PSpice의 경우는 Collector/Base/Emitter순으로 해석하게 되어있는데, Kicad에서 사용하는 NGSpice의 경우는 Base/Collercot/Emitter로 되어있음. https://forum.kicad.info/t/how-to-set-spice-transistor-parameters/11131/9 How to set spice transistor parameters Thanks all for pointing me in the correct directions. Now everything is working and Spice is running nicely 🙂 Just a small problem, it is not working as I ..
[ROS2]tf에 대해서 알아봅시다-1 제가 처음에 ros_control이라거나 gazebo, rviz등을 접했을 때는 urdf로 모델을 만들었기때문에 tf랑 직접 마주칠일이 없었는데 요즘 일때문에 SLAM을 다루다 보니까 tf를 모르면 일이 되지 않더군요. 그래서 한번 짚어봅니다. 자료는 ROS2의 자습서를 참고로 했으니까 소스코드는 따로 업로드하지 않겠습니다. 이 게시물에선 소스코드의 설명을 위주로 하니, 빌드스크립트는 원 게시물인 자습서를 참고로 작성해주세요. TF란 뭘까? 어떤 점에서 프레임과 프레임의 상대적 위치를 표현하는 변환입니다. 예를들어, 자습서에 자주나오는 turtle_sim에서는 거북이의 위치,각도를 world와의 상대적인 위치/방위로 표현합니다. world가 (0,0,0)이고, 기본적인 방위는 (1,0,0,0)이라고 하고..
From implementation of RobotHW to implementation of PI control I have implemented customized RobotHW object and used controller manage to publish/subscribe topics of which enables control joints in this article. https://hellosagal.tistory.com/13 ros_control API를 이용한 하드웨어 제어프로그램 작성 ros_control은 ros에서 임베디드 컨트롤러를 제어하기 위해서 만들어진 API입니다. 하나의 패키지라기보다는 여러개의 계층을 가진 패키지들의 묶음이라고 생각하는게 편하겠네요. 이해하고나면 쉬 hellosagal.tistory.com In this time, I will implement position contr..
ros_control API를 이용한 하드웨어 제어프로그램 작성 ros_control은 ros에서 임베디드 컨트롤러를 제어하기 위해서 만들어진 API입니다. 하나의 패키지라기보다는 여러개의 계층을 가진 패키지들의 묶음이라고 생각하는게 편하겠네요. 이해하고나면 쉬운데... 전 처음에 이 그림을 보고 무슨말인지 잘 모르겠더군요. 큼직한 블록을 하나하나 분해해봅시다. Real Robot - 액추에이터(모터) 장치입니다. 모터+센서+임베디드컨트롤러로 구성되어있고, 계층과는 시리얼통신같은 통신으로 작동합니다. 다시 말해 ros밖의 영역입니다. hardware_interface::RobotHW - 임베디드 컨트롤러와 ros내부와의 인터페이스를 담당합니다. 보통 모터는 로봇의 관절에 붙어있으니까 ros 내부에선 모터를 joint라고 취급합니다. Controller & Contro..
Using shared_ptr in multi-thread process #include #include #include #include #include #include #include #include void WriteSomething(std::shared_ptr const _p_int) { std::stringstream ss; for (size_t i = 0; i fetch_add(1, std::memory_order_acquire); ss fetch_add(1, std::memory_order_acquire); _p_int.store(std::atomic(std::make_shared( *_p_int.load() + 1 )));/*Load the data and update it.*/ ss
Using smart pointers and ownership Recently, I study rust language and interested in concept of ownership. For example, fn main(){ let s = String::from("Hello, world!"); display_string(s); /*display_string(s);*/ /*Makes compile error because lifetime of s has ended*/ } fn display_string(_s: String) { println!("{}", _s); } /*Scope has ended and _s is dropped*/ To prevent memory leakage, in rust, " } " the end of a scope invokes dr..
URDF로봇 이동 시뮬레이션 하기 이 글은 앞선 글의 레퍼런스의 후속 글을 따라해보며 작성한 글입니다. https://gbiggs.github.io/rosjp_urdf_tutorial_text/mobile_robot_gazebo.html ロボットモデリング講習会:URDFの作成方法 by gbiggs 移動型ロボットのシミュレーション Updated on: 2018-02-27 トップに戻る 本セクションでは、移動型ロボットのURDF作成で作成したURDFを拡張して、Gazebo上のシミュレーションに必要な情報を追加し gbiggs.github.io 앞선 글에서 SLAM로봇의 디자인은 만들었지만, 이는 외형만 만들었을 뿐, 질량에 관한 정보는 없습니다. 시뮬레이터로서는 이게 차체가 100kg에 바퀴가 1kg인지 혹은 그 반대인지 알 수가 없다는 이야기지요. 그래서 ..