Blog post coming
This is the discussion topic for the video and blog post linked above. Please keep all replies relevant to the content, otherwise create a new topic.
Blog post coming
This is the discussion topic for the video and blog post linked above. Please keep all replies relevant to the content, otherwise create a new topic.
Hi there, Iām looking to use this video to help me generate a hardware interface for the Robomaster (DJI) M2006 BLDC + C610 ESCās that actuate my 3 DOF robotic arm (a āsimpleā project to help me become more knowledgeable). I already hit a first snag when running colcon build --symlink-install
after downloading both example_2 and example_6 from the ros2_control_demos repository. I get a ton of errors including the two below (I figured Iād start there):
In file included from /home/ubuntu/ros2_ws/src/example_2/hardware/diffbot_system.cpp:15: /home/ubuntu/ros2_ws/src/example_2/hardware/include/ros2_control_demo_example_2/diffbot_system.hpp:42:23: error: \u2018CallbackReturn\u2019 in namespace \u2018hardware_interface\u2019 does not name a type 42 | hardware_interface::CallbackReturn on_init(
/home/ubuntu/ros2_ws/src/example_2/hardware/diffbot_system.cpp: In member function \u2018hardware_interface::return_type ros2_control_demo_example_2::DiffBotSystemHardware::write(const rclcpp::Time&, const rclcpp::Duration&)\u2019: /home/ubuntu/ros2_ws/src/example_2/hardware/diffbot_system.cpp:227:7: error: \u2018info_\u2019 was not declared in this scope 227 | info_.joints[i].name.c_str());
I downloaded from the master branch on GitHub and am trying to build using Foxy in a docker container. Iāll admit that Iām very much NOT knowledgeable about C++, this might be something very silly. Much appreciated if someone can help me get started!
hi, joshnewans. i have issue with encoder dc motor. the two encoders wheels of my robot has different value of counter per second. how can I config ros2 control for each wheel. it is possible?
Hi, this usually means you havenāt installed ros2_control correctly, or havenāt āsourcedā it.
Are you building ros2_control as well or just installing it through apt? Iād recommend the latter
Hi, yeah a few people have raised this and I mentioned it briefly in the video. All you need to do is find where the shared value is used (XML, config struct, parameter reading) and duplicate it, name them appropriately for left/right, and set up the two wheel structs appropriately.
That probably sounds confusing but all in all itās about 4 lines change.
Hi, I installed ros2 control using apt. I ran source ~/ros2_ws/install/setup.bash
but that did not improve things. In a Humble docker container I can build without issues. However, Iād like to use Foxy as Iāve havenāt been able to get Gazebo working on Humble on my M1 Mac. Also, when I ros2 launch ros2_control_demo_example_2 diffbot.launch.py
on Humble, rviz is all black where the āworldā should be. Which is surprising as all other rviz GUI elements display correctly and there are no error messages in the terminal. Does the fact that I can compile on Humble, but not on Foxy trigger any thoughts?
Thanks Joshn for answering me. I followed your instructions . And I successfully colcon build my workplace. But I havenāt tried it in rviz2 yet. Iāll do it tomorrow. Because Iām very sleepyš
Yeah so the humble and foxy branches are different. Right now main is foxy and humble is humble, so make sure you are on the right branch (I should clarify those in the naming, and humble will eventually become the default probably).
Re the rviz thing, is that in the humble docker container? I started having that problem a little while back, there was an update to a system package that broke it. From memory I had to manually downgrade a package to fix it.
I just found a discussion on it [here] (Black Screen on version 11.2.5 Ā· Issue #948 Ā· ros2/rviz Ā· GitHub), check out the last post.
Thanks, I got the demos working in both Foxy and Humble docker containers.