Project Plug, and am I trying to start too many cogs?
mhamen3
Posts: 69
Hi Guys,
I've been working on a hybrid quad/tank robot and, while programming has been going pretty well for the most part, I've hit a snag. Shown below is a snippet of my OBJ block and my start method. For some reason, I don't think the Gait method is starting even though I believe the Startup method is only trying to call 8 cogs.
Here's what I believe should be happening: The Startup method runs on cog0, Servo32v7 starts on cog1, XBeeObject starts on cog2, Float32Full starts on cog3 and cog4, Float32 starts on cog5, RotSumIK starts on cog6, Gait starts on cog7 then the startup method calls SUMnSEND and that runs on cog0. Is my understanding wrong?
EDIT: For clarification, both Float32Full and Float32 are used so that the RotSumIK method and Gait method don't try to call on the same method at the same time. Float32Full is used for RotSumIK and Float32 for gait.
Here's a vid of the bot running RotSumIK and Gait separately, haven't been able to incorporate remote control with gait yet.
I've got a flickr account with some pics of how I manufactured it as well, if you're interested. http://www.flickr.com/photos/marcbots/sets/72157631912836115/detail/?page=2
Thanks for any help.
-Marc
I've been working on a hybrid quad/tank robot and, while programming has been going pretty well for the most part, I've hit a snag. Shown below is a snippet of my OBJ block and my start method. For some reason, I don't think the Gait method is starting even though I believe the Startup method is only trying to call 8 cogs.
OBJ SERVO : "Servo32v7" XB : "Xbee_Object_2" FLTF : "Float32Full" FLT : "Float32" PUB StartUp Servo.Start XB.Start(XB_Rx,XB_Tx,0,XB_Baud) FLTF.Start FLT.Start cognew(RotSumIK, @RotTranStack) cognew(Gait, @GaitStack) SUMnSEND
Here's what I believe should be happening: The Startup method runs on cog0, Servo32v7 starts on cog1, XBeeObject starts on cog2, Float32Full starts on cog3 and cog4, Float32 starts on cog5, RotSumIK starts on cog6, Gait starts on cog7 then the startup method calls SUMnSEND and that runs on cog0. Is my understanding wrong?
EDIT: For clarification, both Float32Full and Float32 are used so that the RotSumIK method and Gait method don't try to call on the same method at the same time. Float32Full is used for RotSumIK and Float32 for gait.
Here's a vid of the bot running RotSumIK and Gait separately, haven't been able to incorporate remote control with gait yet.
I've got a flickr account with some pics of how I manufactured it as well, if you're interested. http://www.flickr.com/photos/marcbots/sets/72157631912836115/detail/?page=2
Thanks for any help.
-Marc
Comments
I think the stacks are fine. If I run the Gait method or RotSumIK methods on their own they work without a hitch. And I use float32 and float32full because the Gait and RotSumIK methods run in parallel on separate cogs and both use floating point math. Things get a little wonky if 2 cogs try to call the same method at the same time. Float32Full is used in RotSumIK for the Acos, Atan and Asin functions and the gait engine only needs Sin, cos and tan so it uses Float32.
Thanks, kuroneko. Any ideas why this caused the Gait method to launch and just using cognew didn't?
QuadHybrid 5-28-13.spin