Open moutalibbadr opened 2 years ago
Hello, This error is still persisting and i just want to add some clarifications. The namespace modifications break the "namespaced single robot" launch if we do not declare namespacing inside the ign_ros2_control::IgnitionROS2ControlPlugin urdf element of the create3
<xacro:if value="${'$(arg gazebo)' == 'ignition'}">
<gazebo>
<plugin filename="ign_ros2_control-system" name="ign_ros2_control::IgnitionROS2ControlPlugin">
<parameters> $(find irobot_create_control)/config/control.yaml </parameters>
<ros>
<namespace>$(arg namespace)</namespace>
<!-- <remapping>/tf:=/$(arg namespace)/tf</remapping> -->
</ros>
</plugin>
</gazebo>
</xacro:if>
When it is done we can spawn and move our create3 with a namespace but the above segfault error will occur if we spawn more than one create3. If we remove the plugin all together from the urdf we get no such error but our create3 robots can not be controlled.
NB : the create3_multi.launch.py
is only available up to this commit 7141668b885496ebb49739371701216608a4c97a
in our repo and has been removed temporarily for the purpose of validating our pull request.
Therefore to reproduce the error you can get back to the old commit.
Hello again,
I've seen that this issue has been pulled up from the To do and I just wanted to know if you think this is not relevant to gz_ros2_control. I know you guys are busy but this is a stumbling block for us and it would be very helpful if you could share any insight on this.
Thank you!
We indeed have discussed wanting to solve this however we are currently a little swamped rolling out chaining controllers and CI fixes. @destogl do you have any useful pointers for this?
In any case @moutalibbadr please feel free to tag along to our working group meeting and add this to the agenda for discussion...
Hello @bmagyar thank you for the feedback. How can I join in on the group meeting ?
The next one will be on the 14th, announcing tomorrow. You can follow this rag on Ros discourse: https://discourse.ros.org/tag/wg-ros2-control
On Thu, 7 Jul 2022, 12:44 moutalibbadr, @.***> wrote:
Hello @bmagyar https://github.com/bmagyar thank you for the feedback. How can I join in on the group meeting ?
— Reply to this email directly, view it on GitHub https://github.com/ros-controls/gz_ros2_control/issues/49#issuecomment-1177477419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA24PYNNQAGYJPPL5IQHEW3VS27KTANCNFSM5UIUKVWA . You are receiving this because you were mentioned.Message ID: @.***>
I believe there might be an issue here unless I am misunderstanding the code.
this->dataPtr->node_ = rclcpp::Node::make_shared(node_name);
is only called on the first plugin call but after that the node_ is never set therefore add_node calls an empty pointer.
It seems to me that you are trying to run this with multiple controller managers, i.e., each robot has it's controller manager. In that case, you should use controller_manager_prefix_node_name
in the .xacro file where Gazebo (Ignition) plugin is defined.
I got his from this line
Try this configuration:
<xacro:if value="${'$(arg gazebo)' == 'ignition'}">
<gazebo>
<plugin filename="ign_ros2_control-system" name="ign_ros2_control::IgnitionROS2ControlPlugin">
<controller_manager_prefix_node_name>$(arg namespace)</controller_manager_prefix_node_name>
<parameters> $(find irobot_create_control)/config/control.yaml </parameters>
<ros>
<namespace>$(arg namespace)</namespace>
<!-- <remapping>/tf:=/$(arg namespace)/tf</remapping> -->
</ros>
</plugin>
</gazebo>
</xacro:if>
And yes! This needs to be enhanced. We should actually use the namespace
parameter to put the controller manager under a specific namespace. For this to work, you should check this setup of the controller manager under a specific namespace so you also get all controllers under the namespace and there is no collision between them. (I would also appreciate review on the demos PR if this works for you :) )
I'm running into this issue as well. With a single controller manager, I can use the controller_manager_prefix_node_name
to properly set the prefix for the controller. However, adding in a second <plugin filename="libign_ros2_control-system.so" ...>...</plugin>
tag to the same URDF causes the same segfault as in the original post, even with the prefix node name tag set.
I agree with @hugo-tardiou 's diagnosis about the segfault happening around those lines. I have experimented with moving around those lines of code into different scope to avoid the segfault, but I can't quite get everything to work properly (probably because I don't fully understand how the ign_ros_control
node plays into the whole system).
Are multiple controller_managers for a single model currently supported in gz_ros2_control?
I've been working on Launching multiple create3 robots in simulation with ignition edifice and ROS2. This feature is not supported out of the box with the create3_sim package and so I had to do some modifications to enable it. However I ran into a segfault error
This error seems to be related to ign_ros2_control_plugin.cpp. It does not appear when spawning one robot.
To recreate this error run this after building this repo :
ros2 launch irobot_create_ignition_bringup create3_multi.launch.py
Any help or lead will be much appreciated. Thank you!