Open sm3304love opened 1 year ago
Sorry for the late reply, this plugin need each roller model and 6-axis parameter. you can reference zm_robot for creating model and xacro file.
zm_robot: https://github.com/qaz9517532846/zm_robot/tree/ros2
Hello,
Sorry, i am new using Gazebo and ROS.
Do you know if we can use the PID drive for any 4-wheeled mecanum robot? I am trying to use the "gazebo_mecanum_pid_plugin" but every time I run the simulation my robot appears without the wheels. Consequently I can't use rostopic pub.
But this doesn't happens when a I use the "gazebo_ros_mecanum_diff_drive".
ROS Noetic
Gazebo 11
If you want to use the PID controller, Please use libgazebo_ros_mecanum_pid_drive.so, Please adjust PID parameter P: 1 I:0 D:0 when using the initial PID controller. It may be that the PID value is too large to exceed the physical limit and the wheel will not appear.
<gazebo>
<plugin name="zm_robot_controller" filename="libgazebo_ros_mecanum_pid_drive.so">
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<robotBaseFrame>base_footprint</robotBaseFrame>
<LeftRear>wheel_joint_1</LeftRear>
<LeftFront>wheel_joint_2</LeftFront>
<RightFront>wheel_joint_3</RightFront>
<RightRear>wheel_joint_4</RightRear>
<odometryRate>20</odometryRate>
<publishWheelTF>true</publishWheelTF>
<publishWheelJointState>true</publishWheelJointState>
<WheelTorque>30</WheelTorque>
<WheelSeparationW>0.5</WheelSeparationW>
<WheelSeparationL>0.6</WheelSeparationL>
<wheelAccel>5</wheelAccel>
<wheelDiameter>0.13</wheelDiameter>
<publishOdom>false</publishOdom>
<isRollerModel>true</isRollerModel>
<dt>0.05</dt>
<WheelInputVelTopic>zm_input_vel</WheelInputVelTopic>
<WheelOutputVelTopic>zm_output_vel</WheelOutputVelTopic>
<WheelPID>gazebo_mecanum_plugins_PID</WheelPID>
</plugin>
</gazebo>
Hello, I have a problem when cloning gazebo_mecanum_plugins and doing catkin_make tells me the following
Building CXX object ira_laser_tools/CMakeFiles/laserscan_virtualizer.dir/src/laserscan_virtualizer.cpp.o
In file included from /home/seb/pp/src/gazebo_mecanum_plugins/src/gazebo_ros_mecanum_pid_drive.cpp:1:
/home/seb/pp/src/gazebo_mecanum_plugins/include/gazebo_mecanum_plugins/gazebo_ros_mecanum_drive.h:23:10: fatal error: gazebo_mecanum_plugins/gazebo_mecanum_plugins_vel.h: No existe el archivo o el directorio
23 | #include <gazebo_mecanum_plugins/gazebo_mecanum_plugins_vel.h>
| ^~~~~~~~~~~~~
compilation terminated.
In file included from /home/seb/pp/src/gazebo_mecanum_plugins/src/gazebo_ros_mecanum_drive.cpp:1:
/home/seb/pp/src/gazebo_mecanum_plugins/include/gazebo_mecanum_plugins/gazebo_ros_mecanum_drive.h:23:10: fatal error: gazebo_mecanum_plugins/gazebo_mecanum_plugins_vel.h: No existe el archivo o el directorio
23 | #include <gazebo_mecanum_plugins/gazebo_mecanum_plugins_vel.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[2]: [gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_pid_drive.dir/build.make:63: gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_pid_drive.dir/src/gazebo_ros_mecanum_pid_drive.cpp.o] Error 1
make[1]: [CMakeFiles/Makefile2:2965: gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_pid_drive.dir/all] Error 2
make[1]: Se espera a que terminen otras tareas....
make[2]: [gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_drive.dir/build.make:63: gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_drive.dir/src/gazebo_ros_mecanum_drive.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2992: gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_drive.dir/all] Error 2
since the file gazebo_mecanum_plugins_vel.h does not exist in gazebo_mecanum_plugins folder and is called in other scripts like gazebo_ros_mecanum_drive.h
Hello, I have a problem when cloning gazebo_mecanum_plugins and doing catkin_make tells me the following Building CXX object ira_laser_tools/CMakeFiles/laserscan_virtualizer.dir/src/laserscan_virtualizer.cpp.o In file included from /home/seb/pp/src/gazebo_mecanum_plugins/src/gazebo_ros_mecanum_pid_drive.cpp:1: /home/seb/pp/src/gazebo_mecanum_plugins/include/gazebo_mecanum_plugins/gazebo_ros_mecanum_drive.h:23:10: fatal error: gazebo_mecanum_plugins/gazebo_mecanum_plugins_vel.h: No existe el archivo o el directorio 23 | #include <gazebo_mecanum_plugins/gazebo_mecanum_plugins_vel.h> | ^
~~~~~~~~~~~~ compilation terminated. In file included from /home/seb/pp/src/gazebo_mecanum_plugins/src/gazebo_ros_mecanum_drive.cpp:1: /home/seb/pp/src/gazebo_mecanum_plugins/include/gazebo_mecanum_plugins/gazebo_ros_mecanum_drive.h:23:10: fatal error: gazebo_mecanum_plugins/gazebo_mecanum_plugins_vel.h: No existe el archivo o el directorio 23 | #include <gazebo_mecanum_plugins/gazebo_mecanum_plugins_vel.h> | ^~~~~~~~~~~~~ compilation terminated. make[2]: [gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_pid_drive.dir/build.make:63: gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_pid_drive.dir/src/gazebo_ros_mecanum_pid_drive.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:2965: gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_pid_drive.dir/all] Error 2 make[1]: Se espera a que terminen otras tareas.... make[2]: [gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_drive.dir/build.make:63: gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_drive.dir/src/gazebo_ros_mecanum_drive.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:2992: gazebo_mecanum_plugins/CMakeFiles/gazebo_ros_mecanum_drive.dir/all] Error 2since the file gazebo_mecanum_plugins_vel.h does not exist in gazebo_mecanum_plugins folder and is called in other scripts like gazebo_ros_mecanum_drive.h
CmakeList.txt not added dependencies message and service cause too compiler error, I updated CmakeList.txt, you comfirm it please.
hello. I would like to use your plugin to use 4 mecanum wheeled robot in gazebo. However, ththat the odom topic is invisible. Are there any other works I should take?
OS: ubuntu 20.04
ros2 foxy
mecanum.urdf.xacro
'mecanum_gazebo.xacro