Closed David9696 closed 2 years ago
@David9696 This page would support you. https://github.com/ros-controls/ros_control/wiki/Writing-CombinedRobotHW
You can run two using a launch file and adding a name space to each node. Example of what I did below for the launch file:
The "ns" is the namespace param
`
<param name="num_motor_pole_pairs" value="14"/>
I close this issue since there is no reply from the author for one week.
@David9696 This page would support you. https://github.com/ros-controls/ros_control/wiki/Writing-CombinedRobotHW
Hi,
Thanks.
I followed the tutorial and it worked.
You can run two using a launch file and adding a name space to each node. Example of what I did below for the launch file: The "ns" is the namespace param
<node pkg="vesc_driver" type="vesc_driver_node" name="vesc_left" ns="vesc_left"> <param name="port" value="/dev/ttyACM0" /> <param name="num_motor_pole_pairs" value="14"/> </node> <node pkg="vesc_driver" type="vesc_driver_node" name="vesc_right" ns="vesc_right"> <param name="port" value="/dev/ttyACM1" /> <param name="num_motor_pole_pairs" value="14"/> </node>
With this I can reference each node in the code as follows:vel_left_pub_ = nh_.advertise<std_msgs::Float64>("vesc_left/commands/motor/current", 1); vel_right_pub_ = nh_.advertise<std_msgs::Float64>("vesc_right/commands/motor/current", 1);
Hopefully this helps.
Hi,
Thanks.
This method works as well.
@David9696 Hi! I am trying to use vesc_hw_interface to interface two vesc drivers through two different ports to control a differential drive robot.
Since it worked with you, can you please describe how you used CombinedRobotHW to do that?
Thank you in advance.
Hi,
Thanks for the great package.
I am thinking to make a simple arm with 2 joints. How could I run multiple vesc controllers with this package? I understand that it is possible to achieve it by using CombinedRobotHW. However, I am new to ROS and still learning. Could you please give me some guides or examples for how to proceed?
Appreciate if you could you could help.
Thanks,
David