Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with 2 roboclaws #6

Open
pranavhj opened this issue Feb 7, 2020 · 1 comment
Open

Working with 2 roboclaws #6

pranavhj opened this issue Feb 7, 2020 · 1 comment

Comments

@pranavhj
Copy link

pranavhj commented Feb 7, 2020

Hey,
Thanks for the library, it really works well and i have been able to control 1 roboclaw quite well,
I wanted to ask you how to configure the launch file roboclaw_multi.launch to work with 2 roboclaws
1 of my roboclaws is connected to port
and the other one to
They work when i run the roboclaw_single.launch file and enter any of the above port name, but when i go to the roboclaw_multi.launch I dont understand how do i add the second serial port address as a launch file argument....

@alduxvm
Copy link

alduxvm commented Oct 4, 2020

Hi,

I made it work using two roboclaws, not in the way its indicated on the readme which is using packet serial mode, that did not worked for me, but what it did worked, is that I created two launch files based on the https://github.com/csvance/roboclaw/blob/master/launch/roboclaw_single.launch modifying the ports according to the ports in my computer, also both my roboclaws are using the same ID 0x80, just a different port, then I created a copy from the diffdrive.launch that looks like this:


    <include file="/home/kingbee/robo_csvance/src/roboclaw/launch/roboclaw_front.launch"/> 
    <include file="/home/kingbee/robo_csvance/src/roboclaw/launch/roboclaw_rear.launch"/>    

    <node pkg="roboclaw" type="diffdrive_node" name="diffdrive" output="screen">
        <param name="~roboclaws" value="1"/>
        <param name="~steps_per_meter" value="12511"/>
        <param name="~base_width" value="0.4"/>
        <param name="~swap_motors" value="false"/>
        <param name="~invert_motor_1" value="false"/>
        <param name="~invert_motor_2" value="false"/>
        <param name="~var_pos_x" value="0.01"/>
        <param name="~var_pos_y" value="0.01"/>
        <param name="~var_theta_z" value="0.01"/>
    </node>
</launch>

And that works! both move properly!

My only issue is the odom which is messed up (because is reading both encoders at the same time, instead of just reading one...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants