User Tools

Site Tools


visual3d:tutorials:bicycle_pedal_and_crank

This is an old revision of the document!


here]] ====== open the movement trial ====== open the file pedal_motion.c3d pedaltutorial1.jpg note that there are only two markers. pedaltutorial2.jpg highlight the path of the markers as trails. select the target u1 with a right mouse click. select the option "draw target properties" pedaltutorial3.jpg select the options to draw the trail and specify the color. pedaltutorial4.jpg the circular path of each marker should be drawn in the animation. ====== create the model ====== pedaltutorial5.jpg ===== apply the model template ===== apply the model template pedal.mdh that was part of the zip file downloaded pedaltutorial9.jpg note that there are only two landmarks pedaltutorial8.jpg note that there are 6 segments, but none of them has been built because of missing information. pedaltutorial6.jpg there should be many error messages at this point. we will add in the missing information using pipeline commands. pedaltutorial7.jpg ====== create virtual targets and landmarks ====== created virtual targets and landmarks based on the circular path of the markers on the pedals. the underlying assumptions are that the crank rotates about a fixed axis, the pedals sit at the end of the crank and rotate with the crank axis, but are always oriented vertically. first, make the movement trial the active file second, create targets for the center of the path of each marker and for a marker 0.1 meters along the normal to that path. **create_target** /signal_names=rcenter+rnormal+lcenter+lnormal ! /signal_description= /expression='best_fit_circle(target::original::u1)','vector(target::original::rcenter,0)-0.1*best_fit_plane(target::original::u1)','best_fit_circle(target::original::u2)','vector(target::original::lcenter,0)-0.1*best_fit_plane(target::original::u2)' ! /include_motionfile=true ! /include_calfile=false **;** this command uses the evaluate_expression function best_fit_circle(target::original::u2) to find the center and radius of a circle that best fits the path of the marker. pedaltutorial10.jpg third, based on the location of these targets in the movement trial, create associated landmarks. **add_landmark** /landmark_name=rcenter ! /calibration_file= ! /user_generated=true ! /use_percentage=false ! /calibration_only=false ! /use_targets=false /segment_name=lab ! /target_types= ! /target_names= /mcs_ml=@eval(mean(target::original::rcenter)[1,1]) /mcs_ap=@eval(mean(target::original::rcenter)[1,2]) /mcs_axial=@eval(mean(target::original::rcenter)[1,3]) ! /landmark_location= ! /reference_location_type= ! /reference_location_name= ! /use_reference_location=false **;** this command takes advantage of the @eval() function in the pipeline parameters. the command evaluates the expression based on the data in the active movement file, then assigns the values to the add_landmark command. **add_landmark** /landmark_name=rnormal ! /calibration_file= ! /user_generated=true ! /use_percentage=false ! /calibration_only=false ! /use_targets=false /segment_name=lab ! /target_types= ! /target_names= /mcs_ml=@eval(mean(target::original::rnormal)[1,1]) /mcs_ap=@eval(mean(target::original::rnormal)[1,2]) /mcs_axial=@eval(mean(target::original::rnormal)[1,3]) ! /landmark_location= ! /reference_location_type= ! /reference_location_name= ! /use_reference_location=false **;** **add_landmark** /landmark_name=rcenter_up ! /calibration_file= ! /user_generated=true ! /use_percentage=false ! /calibration_only=false ! /use_targets=false /segment_name=lab ! /target_types= ! /target_names= /mcs_ml=@eval(mean(target::original::rcenter)[1,1]) /mcs_ap=@eval(mean(target::original::rcenter)[1,2]) /mcs_axial=@eval(mean(target::original::rcenter)[1,3]+0.001) ! /landmark_location= ! /reference_location_type= ! /reference_location_name= ! /use_reference_location=false **;** **add_landmark** /landmark_name=lcenter ! /calibration_file= ! /user_generated=true ! /use_percentage=false ! /calibration_only=false ! /use_targets=false /segment_name=lab ! /target_types= ! /target_names= /mcs_ml=@eval(mean(target::original::lcenter)[1,1]) /mcs_ap=@eval(mean(target::original::lcenter)[1,2]) /mcs_axial=@eval(mean(target::original::lcenter)[1,3]) ! /landmark_location= ! /reference_location_type= ! /reference_location_name= ! /use_reference_location=false **;** **add_landmark** /landmark_name=lnormal ! /calibration_file= ! /user_generated=true ! /use_percentage=false ! /calibration_only=false ! /use_targets=false /segment_name=lab ! /target_types= ! /target_names= /mcs_ml=@eval(mean(target::original::lnormal)[1,1]) /mcs_ap=@eval(mean(target::original::lnormal)[1,2]) /mcs_axial=@eval(mean(target::original::lnormal)[1,3]) ! /landmark_location= ! /reference_location_type= ! /reference_location_name= ! /use_reference_location=false **;** **add_landmark** /landmark_name=lcenter_up ! /calibration_file= ! /user_generated=true ! /use_percentage=false ! /calibration_only=false ! /use_targets=false /segment_name=lab ! /target_types= ! /target_names= /mcs_ml=@eval(mean(target::original::lcenter)[1,1]) /mcs_ap=@eval(mean(target::original::lcenter)[1,2]) /mcs_axial=@eval(mean(target::original::lcenter)[1,3]+0.001) ! /landmark_location= ! /reference_location_type= ! /reference_location_name= ! /use_reference_location=false **;** lastly build the model **build_model** ! /calibration_file= ! /rebuild_all_models=false ! /display_results=true **;** the resulting model and movement trial are: pedaltutorial11.jpg pedaltutorial12.jpg ====== modeling details ====== pedaltutorial13.jpg two ik chains were constructed, one for each pedal. note that the root segment of the chain has all translations and rotations constrained. the problem is that we don't want the pedal constrained to the lab, but to the location of the marker on the pedal. we specified this using motion constraints. selected the properties tab pedaltutorial14.jpg the origin of the reference for the crank is placed just above the center of the marker path and rotated 180 degrees about the vertical axis of the lab. the crank and pedal are then given one degree of freedom about the x-axis, and one tracking marker. }}}}}}}}}}}}}}}}}}}}}}}}}}

visual3d/tutorials/bicycle_pedal_and_crank.1718801650.txt.gz · Last modified: 2024/06/19 12:54 by sgranger