V-REP和Python的联合仿真
机器人仿真软件 各类免费的的机器人仿真软件优缺点汇总_robot 仿真 软件收费么_dyannacon的博客-CSDN博客
课程地址 https://class.guyuehome.com/p/t_pc/course_pc_detail/column/p_605af87be4b007b4183a42e7
课程资料 guyueclass: 古月学院课程代码
旋转变换 旋转的左乘与右乘 - 知乎
四足机器人站立控制原理 【基础知识】四足机器人的站立姿态控制原理 - 知乎
单腿逆解参考 https://github.com/richardbloemenkamp/Robotdog
Vrep文档

Vrep放大object

Vrep 导入模型步骤:
1. plugins-->urdf import导入机器人URDF文件
2. 删除机器人对象中的world_joint和world_link_visual
3. 双击设置机器人参数
碰撞参数设置:body参数设置,自身碰撞勾选前四个勾,leg参数设置,自身碰撞勾选后四个勾,即不计算与自身的碰撞关系

设置关节参数


调节颜色

python联合仿真
remote API路径:C:\Program Files\CoppeliaRobotics\CoppeliaSimEdu\programming\remoteApiBindings
1. 选择仿真器

2. 创建Vrep脚本用于远程连接

3. 绑定脚本到机器人

4. 编辑脚本,添加远程连接代码

4. 编写python脚本并测试(将腿部足端位置转换为关节的角度)
连接V-REP需要从remote API路径拷贝相关文件
"""
连接VREP Server并测试控制四足机器人
"""
try:import sim
except ImportError:print('--------------------------------------------------------------')print('"sim.py" could not be imported. This means very probably that')print('either "sim.py" or the remoteApi library could not be found.')print('Make sure both are in the same folder as this file,')print('or appropriately adjust the file "sim.py"')print('--------------------------------------------------------------')print('')sim = Noneimport time
import numpy as npdef start_simulation():sim.simxFinish(-1)# 开启套接字与server进行通信clientID = sim.simxStart('127.0.0.1', 19999, True, True, 5000, 5)if clientID != -1:print('Connected to remote API server with ClientID ', clientID)# 开始模拟sim.simxStartSimulation(clientID, sim.simx_opmode_oneshot)return clientIDelse:return -1def get_joints(client_id):# 机器人电机力矩参数rotation_forces = [# RB[500, 500, 500],# RF[500, 500, 500],# LB[500, 500, 500],# LF[500, 500, 500]]# 获取机器人关节对象句柄rec, rb_rot_1 = sim.simxGetObjectHandle(client_id, 'rb_rot_1', sim.simx_opmode_blocking)rec, rb_rot_2 = sim.simxGetObjectHandle(client_id, 'rb_rot_2', sim.simx_opmode_blocking)rec, rb_rot_3 = sim.simxGetObjectHandle(client_id, 'rb_rot_3', sim.simx_opmode_blocking)rec, rf_rot_1 = sim.simxGetObjectHandle(client_id, 'rf_rot_1', sim.simx_opmode_blocking)rec, rf_rot_2 = sim.simxGetObjectHandle(client_id, 'rf_rot_2', sim.simx_opmode_blocking)rec, rf_rot_3 = sim.simxGetObjectHandle(client_id, 'rf_rot_3', sim.simx_opmode_blocking)rec, lb_rot_1 = sim.simxGetObjectHandle(client_id, 'lb_rot_1', sim.simx_opmode_blocking)rec, lb_rot_2 = sim.simxGetObjectHandle(client_id, 'lb_rot_2', sim.simx_opmode_blocking)rec, lb_rot_3 = sim.simxGetObjectHandle(client_id, 'lb_rot_3', sim.simx_opmode_blocking)rec, lf_rot_1 = sim.simxGetObjectHandle(client_id, 'lf_rot_1', sim.simx_opmode_blocking)rec, lf_rot_2 = sim.simxGetObjectHandle(client_id, 'lf_rot_2', sim.simx_opmode_blocking)rec, lf_rot_3 = sim.simxGetObjectHandle(client_id, 'lf_rot_3', sim.simx_opmode_blocking)# 设置电机力矩rec = sim.simxSetJointForce(client_id, rb_rot_1, rotation_forces[0][0], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rb_rot_2, rotation_forces[0][1], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rb_rot_3, rotation_forces[0][2], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rf_rot_1, rotation_forces[1][0], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rf_rot_2, rotation_forces[1][1], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rf_rot_3, rotation_forces[1][2], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lb_rot_1, rotation_forces[2][0], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lb_rot_2, rotation_forces[2][1], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lb_rot_3, rotation_forces[2][2], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lf_rot_1, rotation_forces[3][0], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lf_rot_2, rotation_forces[3][1], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lf_rot_3, rotation_forces[3][2], sim.simx_opmode_blocking)return [rb_rot_1, rb_rot_2, rb_rot_3], \[rf_rot_1, rf_rot_2, rf_rot_3], \[lb_rot_1, lb_rot_2, lb_rot_3], \[lf_rot_1, lf_rot_2, lf_rot_3]def leg_inverse_kine(x, y, z):# h,hu和hl分别是单条腿杆件的长度h = 0.15hu = 0.35hl = 0.382dyz = np.sqrt(y**2 + z**2)lyz = np.sqrt(dyz**2 - h**2)gamma_yz = -np.arctan(y/z)gamma_h_offset = -np.arctan(h/lyz)gamma = gamma_yz - gamma_h_offsetlxzp = np.sqrt(lyz**2 + x**2)n = (lxzp**2 - hl**2 - hu**2) / (2 * hu)beta = -np.arccos(n / hl)alfa_xzp = -np.arctan(x/lyz)alfa_off = np.arccos((hu + n) / lxzp)alfa = alfa_xzp + alfa_offreturn gamma, alfa, betaif __name__ == '__main__':# 机器人电机角度参数rb_poses = [40*np.pi/180, 0, 0]rf_poses = [0, 0, 0]lb_poses = [0, 0, 0]lf_poses = [0, 0, 0]client_id = start_simulation()if client_id != -1:joints = get_joints(client_id)rb_joints = joints[0]rf_joints = joints[1]lb_joints = joints[2]lf_joints = joints[3]time.sleep(1)timeout = 60start_time = time.time()curr_time = time.time()# 初始关节角度rb_poses = leg_inverse_kine(0, -0.3, -0.632)rf_poses = leg_inverse_kine(0, -0.3, -0.632)lb_poses = leg_inverse_kine(0, -0.3, -0.632)lf_poses = leg_inverse_kine(0, -0.3, -0.632)while curr_time - start_time < timeout:# 设置关节角度rec = sim.simxSetJointTargetPosition(client_id, rb_joints[0], -rb_poses[0], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, rb_joints[1], rb_poses[1], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, rb_joints[2], rb_poses[2], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, rf_joints[0], rf_poses[0], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, rf_joints[1], rf_poses[1], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, rf_joints[2], rf_poses[2], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, lb_joints[0], -lb_poses[0], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, lb_joints[1], lb_poses[1], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, lb_joints[2], lb_poses[2], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, lf_joints[0], lf_poses[0], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, lf_joints[1], lf_poses[1], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(client_id, lf_joints[2], lf_poses[2], sim.simx_opmode_oneshot)curr_time = time.time()# print("curr time :", curr_time - start_time)# 完成模拟sim.simxStopSimulation(client_id, sim.simx_opmode_blocking)sim.simxFinish(client_id)else:print('Failed connecting to remote API server')
显示足端轨迹
1. 打开shape编辑模式,并在vertex编辑模式下选择节点,在添加dummy

将dummy移动到腿部object下

2. 添加图用于创建curve


3. 设置3D Curve






4. 修改位置控制速度上限(将速度上限修改为500)

步态控制
utils.py
import sim
import numpy as npdef start_simulation():sim.simxFinish(-1)# 开启套接字与server进行通信clientID = sim.simxStart('127.0.0.1', 19999, True, True, 5000, 5)if clientID != -1:print('Connected to remote API server with ClientID ', clientID)# 开始模拟sim.simxStartSimulation(clientID, sim.simx_opmode_oneshot)return clientIDelse:return -1def get_joints(client_id):# 机器人电机力矩参数rotation_forces = [# RB[500, 500, 500],# RF[500, 500, 500],# LB[500, 500, 500],# LF[500, 500, 500]]# 获取机器人关节对象句柄rec, rb_rot_1 = sim.simxGetObjectHandle(client_id, 'rb_rot_1', sim.simx_opmode_blocking)rec, rb_rot_2 = sim.simxGetObjectHandle(client_id, 'rb_rot_2', sim.simx_opmode_blocking)rec, rb_rot_3 = sim.simxGetObjectHandle(client_id, 'rb_rot_3', sim.simx_opmode_blocking)rec, rf_rot_1 = sim.simxGetObjectHandle(client_id, 'rf_rot_1', sim.simx_opmode_blocking)rec, rf_rot_2 = sim.simxGetObjectHandle(client_id, 'rf_rot_2', sim.simx_opmode_blocking)rec, rf_rot_3 = sim.simxGetObjectHandle(client_id, 'rf_rot_3', sim.simx_opmode_blocking)rec, lb_rot_1 = sim.simxGetObjectHandle(client_id, 'lb_rot_1', sim.simx_opmode_blocking)rec, lb_rot_2 = sim.simxGetObjectHandle(client_id, 'lb_rot_2', sim.simx_opmode_blocking)rec, lb_rot_3 = sim.simxGetObjectHandle(client_id, 'lb_rot_3', sim.simx_opmode_blocking)rec, lf_rot_1 = sim.simxGetObjectHandle(client_id, 'lf_rot_1', sim.simx_opmode_blocking)rec, lf_rot_2 = sim.simxGetObjectHandle(client_id, 'lf_rot_2', sim.simx_opmode_blocking)rec, lf_rot_3 = sim.simxGetObjectHandle(client_id, 'lf_rot_3', sim.simx_opmode_blocking)# 设置电机力矩rec = sim.simxSetJointForce(client_id, rb_rot_1, rotation_forces[0][0], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rb_rot_2, rotation_forces[0][1], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rb_rot_3, rotation_forces[0][2], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rf_rot_1, rotation_forces[1][0], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rf_rot_2, rotation_forces[1][1], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, rf_rot_3, rotation_forces[1][2], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lb_rot_1, rotation_forces[2][0], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lb_rot_2, rotation_forces[2][1], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lb_rot_3, rotation_forces[2][2], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lf_rot_1, rotation_forces[3][0], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lf_rot_2, rotation_forces[3][1], sim.simx_opmode_blocking)rec = sim.simxSetJointForce(client_id, lf_rot_3, rotation_forces[3][2], sim.simx_opmode_blocking)return [rb_rot_1, rb_rot_2, rb_rot_3], \[rf_rot_1, rf_rot_2, rf_rot_3], \[lb_rot_1, lb_rot_2, lb_rot_3], \[lf_rot_1, lf_rot_2, lf_rot_3]def leg_inverse_kine(x, y, z):"""求四足机器人单条腿的逆运动学,输入足端位置,返回单腿关节的旋转的角度"""# h,hu和hl分别是单条腿杆件的长度h = 0.15hu = 0.35hl = 0.382dyz = np.sqrt(y ** 2 + z ** 2)lyz = np.sqrt(dyz ** 2 - h ** 2)gamma_yz = -np.arctan(y / z)gamma_h_offset = -np.arctan(h / lyz)gamma = gamma_yz - gamma_h_offsetlxzp = np.sqrt(lyz ** 2 + x ** 2)n = (lxzp ** 2 - hl ** 2 - hu ** 2) / (2 * hu)beta = -np.arccos(n / hl)alfa_xzp = -np.arctan(x / lyz)alfa_off = np.arccos((hu + n) / lxzp)alfa = alfa_xzp + alfa_offreturn gamma, alfa, betadef pose_control(roll, pitch, yaw, pos_x, pos_y, pos_z):"""输入"""b = 0.4l = 0.8w = 0.7# 基座的高度h = 0.732# 转换角度R = roll * np.pi / 180P = pitch * np.pi / 180Y = yaw * np.pi / 180pos = np.mat([pos_x, pos_y, pos_z]).T# 定义旋转矩阵rotx = np.mat([[1, 0, 0],[0, np.cos(R), -np.sin(R)],[0, np.sin(R), np.cos(R)]])roty = np.mat([[np.cos(P), 0, -np.sin(P)],[0, 1, 0],[np.sin(P), 0, np.cos(P)]])rotz = np.mat([[np.cos(Y), -np.sin(Y), 0],[np.sin(Y), np.cos(Y), 0],[0, 0, 1]])rot_mat = rotx * roty * rotz# 基座位置body_struct = np.mat([[l / 2, b / 2, h],[l / 2, -b / 2, h],[-l / 2, b / 2, h],[-l / 2, -b / 2, h]]).T# 足端位置footpoint_struct = np.mat([[l / 2, w / 2, 0],[l / 2, -w / 2, 0],[-l / 2, w / 2, 0],[-l / 2, -w / 2, 0]]).Tleg_pose = np.mat(np.zeros((3, 4)))for i in range(4):leg_pose[:, i] = -pos - rot_mat * body_struct[:, i] + footpoint_struct[:, i]return np.squeeze(np.array(leg_pose[:, 3])), np.squeeze(np.array(leg_pose[:, 0])), \np.squeeze(np.array(leg_pose[:, 1])), np.squeeze(np.array(leg_pose[:, 2]))def cycloid(dt: float, period: float = 1.0, xs: float = -0.1, xf: float = 0.1, zs: float = -0.582, h: float = 0.1):"""计算摆线上在给定时间t处的坐标。参数:t (float): 当前时间点Ts (float): 摆线运动总时间,默认为1.0xs (float): 起始x坐标,默认为-0.1xf (float): 终点x坐标,默认为0.1zs (float): 起始z坐标,默认为-0.582h (float): 摆线垂直位移,默认为0.1返回:tuple[float, float]: xep和zep的坐标值"""sigma = 2 * np.pi * dt / periodx_p = (xf - xs) * ((sigma - np.sin(sigma)) / (2 * np.pi)) + xsy_p = h * (1 - np.cos(sigma)) / 2 + zsreturn x_p, y_pif __name__ == '__main__':for pos in pose_control(30, 0, 0, 0, 0, 0.732):print(pos)
main.py
import time
from utils import *walk_period = 1.0
trot_period = 0.4gait = 1def cal_phase(dt, T, factor, zs = -0.482, h = 0.15):if dt < T * factor:return cycloid(dt, period=T * factor, zs=zs, h=h)else:return 0.1 - 0.2 / (T * (1 - factor)) * (dt - T * factor), zsdef walk_gait(dt):zs = -0.482h = 0.15lb_dt = dt % walk_periodrf_dt = (dt + 0.25) % walk_periodrb_dt = (dt + 0.5) % walk_periodlf_dt = (dt + 0.75) % walk_periodlb_pos = cal_phase(lb_dt, T=walk_period, factor=0.25, zs=zs, h=h)rf_pos = cal_phase(rf_dt, T=walk_period, factor=0.25, zs=zs, h=h)rb_pos = cal_phase(rb_dt, T=walk_period, factor=0.25, zs=zs, h=h)lf_pos = cal_phase(lf_dt, T=walk_period, factor=0.25, zs=zs, h=h)return lb_pos, rf_pos, rb_pos, lf_posdef trot_gait(dt):zs = -0.482h = 0.1dt_1 = dt % trot_perioddt_2 = (dt + 0.2) % trot_periodpos_1 = cal_phase(dt_1, T=trot_period, factor=0.5, zs=zs, h=h)pos_2 = cal_phase(dt_2, T=trot_period, factor=0.5, zs=zs, h=h)return pos_1, pos_2if __name__ == '__main__':# 连接到V-REP服务器clientID = start_simulation()# 检查连接是否成功if clientID != -1:joints = get_joints(clientID)rb_joints = joints[0]rf_joints = joints[1]lb_joints = joints[2]lf_joints = joints[3]timeout = 60start_time = time.time()curr_time = start_timesim_start_time, sim_curr_time = None, Nonelb_pos, rf_pos, rb_pos, lf_pos = None, None, None, None# 获取仿真时间while curr_time - start_time < timeout:res, sim_curr_time = sim.simxGetFloatSignal(clientID, 'time', sim.simx_opmode_oneshot)if res == sim.simx_return_ok:if sim_start_time is None:sim_start_time = sim_curr_timeprint("time ", sim_curr_time - sim_start_time)if sim_start_time:dt = sim_curr_time - sim_start_timeif gait == 0:# dt = (sim_curr_time - sim_start_time) % walk_periodlb_pos, rf_pos, rb_pos, lf_pos = walk_gait(dt)elif gait == 1:# dt = (sim_curr_time - sim_start_time) % trot_periodpos_1, pos_2 = trot_gait(dt)lb_pos = pos_1rf_pos = pos_1rb_pos = pos_2lf_pos = pos_2# 从足端位置求解关节角度rb_pose = leg_inverse_kine(rb_pos[0], -0.15, rb_pos[1])rf_pose = leg_inverse_kine(rf_pos[0], -0.15, rf_pos[1])lb_pose = leg_inverse_kine(lb_pos[0], -0.15, lb_pos[1])lf_pose = leg_inverse_kine(lf_pos[0], -0.15, lf_pos[1])rec = sim.simxSetJointTargetPosition(clientID, rb_joints[0], -rb_pose[0], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, rb_joints[1], rb_pose[1], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, rb_joints[2], rb_pose[2], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, rf_joints[0], rf_pose[0], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, rf_joints[1], rf_pose[1], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, rf_joints[2], rf_pose[2], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, lb_joints[0], -lb_pose[0], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, lb_joints[1], lb_pose[1], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, lb_joints[2], lb_pose[2], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, lf_joints[0], lf_pose[0], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, lf_joints[1], lf_pose[1], sim.simx_opmode_oneshot)rec = sim.simxSetJointTargetPosition(clientID, lf_joints[2], lf_pose[2], sim.simx_opmode_oneshot)# 停止仿真并断开与V-REP的连接sim.simxStopSimulation(clientID, sim.simx_opmode_oneshot)sim.simxFinish(clientID)else:print("无法连接到V-REP")
walk步态

trot步态

相关文章:
V-REP和Python的联合仿真
机器人仿真软件 各类免费的的机器人仿真软件优缺点汇总_robot 仿真 软件收费么_dyannacon的博客-CSDN博客 课程地址 https://class.guyuehome.com/p/t_pc/course_pc_detail/column/p_605af87be4b007b4183a42e7 课程资料 guyueclass: 古月学院课程代码 旋转变换 旋转的左乘与…...
WPF布局控件之DockPanel布局
前言:博主文章仅用于学习、研究和交流目的,不足和错误之处在所难免,希望大家能够批评指出,博主核实后马上更改。 概述: DockPanel 位置子控件基于子 Dock 属性,你有 4 个选项停靠,左 (默认) &…...
【实战Flask API项目指南】之二 Flask基础知识
实战Flask API项目指南之 Flask基础知识 本系列文章将带你深入探索实战Flask API项目指南,通过跟随小菜的学习之旅,你将逐步掌握Flask 在实际项目中的应用。让我们一起踏上这个精彩的学习之旅吧! 前言 当小菜踏入Flask后端开发的世界&…...
Linux 编译链接那些事儿(02)C++链接库std::__cxx11::basic_string和std::__1::basic_string链接问题总结
1 问题背景说明 在自己的项目源码中引用libeasysqlite.so时编译成功,但运行时遇到问题直接报错,找不到符号 symbol:_ZN3sql5FieldC1ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_10field_typeEi。 2 问题描述和解…...
按键精灵中的UI界面操作
1. 按键精灵中UI界面常用的控件 1. 文字框 界面1: {标签页1:{文字框:{名称:"文字框1",显示内容:"显示内容",文字大小:0,高度:0,宽度:0,注释:"文字大小、高度、宽度是可选属性,如需使用默认值,可保持值为0或直接删除此属性&qu…...
dpdk 程序如何配置网卡收发包队列描述符配置?
问题描述 dpdk 程序在配置网卡队列时会涉及收发包队列描述符数量配置问题,收发包描述符的数量看似是一个简单的配置,却对转发性能有着一定的影响。实际业务程序中,收发包描述符大小配置一般参考 dpdk 内部示例程序配置进行,经验之…...
二蛋赠书七期:《云原生数据中台:架构、方法论与实践》
前言 大家好!我是二蛋,一个热爱技术、乐于分享的工程师。在过去的几年里,我一直通过各种渠道与大家分享技术知识和经验。我深知,每一位技术人员都对自己的技能提升和职业发展有着热切的期待。因此,我非常感激大家一直…...
计算机毕设 基于大数据的服务器数据分析与可视化系统 -python 可视化 大数据
文章目录 0 前言1 课题背景2 实现效果3 数据收集分析过程**总体框架图****kafka 创建日志主题****flume 收集日志写到 kafka****python 读取 kafka 实时处理****数据分析可视化** 4 Flask框架5 最后 0 前言 🔥 这两年开始毕业设计和毕业答辩的要求和难度不断提升&a…...
初识rust
调试下rust 的执行流程 参考: 认识 Cargo - Rust语言圣经(Rust Course) 新建一个hello world 程序: fn main() {println!("Hello, world!"); }用IDA 打开exe,并加载符号: 根据字符串找到主程序入口: 双击…...
shiro-cve2016-4437漏洞复现
一、漏洞特征 Apache Shiro是一款开源强大且易用的Java安全框架,提供身份验证、授权、密码学和会话管理。Shiro框架直观、易用,同时也能提供健壮的安全性。 因为在反序列化时,不会对其进行过滤,所以如果传入恶意代码将会造成安全问题 在 1.2.4 版本前, 加…...
【MongoDB-Redis-MySQL-Elasticsearch-Kibana-RabbitMQ-MinIO】Java全栈开发软件一网打尽
“Java全栈开发一网打尽:在Windows环境下探索技术世界的奇妙之旅” 前言 全栈开发是一项复杂而令人兴奋的任务,涵盖了从前端到后端、数据库到可视化层、消息队列到文件存储的广泛领域。本文将带您深入探讨在Windows环境下进行全栈开发的过程࿰…...
Implementing class错误解决
最近在使用IDEASmart Tomcat启动项目时,报以下错误: Injection of resource dependencies failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class根据网上结论加上我这里的原因,总共以下几个方面&#x…...
关于 国产系统UOS系统Qt开发Tcp服务器外部连接无法连接上USO系统 的解决方法
若该文为原创文章,转载请注明原文出处 本文章博客地址:https://hpzwl.blog.csdn.net/article/details/134254817 红胖子(红模仿)的博文大全:开发技术集合(包含Qt实用技术、树莓派、三维、OpenCV、OpenGL、ffmpeg、OSG、单片机、软…...
初阶JavaEE(15)(Cookie 和 Session、理解会话机制 (Session)、实现用户登录网页、上传文件网页、常用的代码片段)
接上次博客:初阶JavaEE(14)表白墙程序-CSDN博客 Cookie 和 Session 你还记得我们之前提到的Cookie吗? Cookie是HTTP请求header中的一个属性,是一种用于在浏览器和服务器之间持久存储数据的机制,允许网站…...
C++入门学习(1)命名空间和输入输出
前言 在C语言和基本的数据结构学习之后,我们终于迎来了期待已久的C啦!C发明出来的意义就是填补一些C语言的不足,让我们更加方便的写代码,所以今天我们就来讲一下C语言不足的地方和在C中的解决办法! 一、命名空间 在学习…...
AI:58-基于深度学习的猫狗图像识别
🚀 本文选自专栏:AI领域专栏 从基础到实践,深入了解算法、案例和最新趋势。无论你是初学者还是经验丰富的数据科学家,通过案例和项目实践,掌握核心概念和实用技能。每篇案例都包含代码实例,详细讲解供大家学习。 📌📌📌在这个漫长的过程,中途遇到了不少问题,但是…...
【原创】java+swing+mysql宠物领养管理系统设计与实现
摘要: 生活中,有很多被人遗弃的宠物,这些宠物的处理成为了一个新的难题。生活中也有许多人喜欢养宠物,为了方便大家进行宠物领养,提高宠物领养管理的效率和便利性。本文针对这一问题,提出设计和实现一个基…...
虚拟机Linux-Centos系统网络配置常用命令+Docker 的常用命令
目录 1、虚拟机Linux-Centos系统网络配置常用命令2、Docker 的常用命令2.1 安装docker步骤命令2.2 在docker容器中安装和运行mysql 2、dockerfile关键字区别(ADD/COPY,CMD/ENTRYPOINT) 1、虚拟机Linux-Centos系统网络配置常用命令 进入网络配置文件目录 cd /etc/sysconfig/ne…...
数据分析相关知识整理_--秋招面试版
一、关于sql语句(常问) 1)sql写过的复杂的运算 聚合函数,case when then end语句进行条件运算,字符串的截取、替换,日期的运算,排名等等;行列转换; eg:行列转换 SELE…...
HMM与LTP词性标注之命名实体识别与HMM
文章目录 知识图谱介绍NLP应用场景知识图谱(Neo4j演示)命名实体识别模型架构讲解HMM与CRFHMM五大要素(两大状态与三大概率)HMM案例分享HMM实体识别应用场景代码实现 知识图谱介绍 NLP应用场景 图谱的本质,就是把自然…...
零门槛NAS搭建:WinNAS如何让普通电脑秒变私有云?
一、核心优势:专为Windows用户设计的极简NAS WinNAS由深圳耘想存储科技开发,是一款收费低廉但功能全面的Windows NAS工具,主打“无学习成本部署” 。与其他NAS软件相比,其优势在于: 无需硬件改造:将任意W…...
模型参数、模型存储精度、参数与显存
模型参数量衡量单位 M:百万(Million) B:十亿(Billion) 1 B 1000 M 1B 1000M 1B1000M 参数存储精度 模型参数是固定的,但是一个参数所表示多少字节不一定,需要看这个参数以什么…...
大数据零基础学习day1之环境准备和大数据初步理解
学习大数据会使用到多台Linux服务器。 一、环境准备 1、VMware 基于VMware构建Linux虚拟机 是大数据从业者或者IT从业者的必备技能之一也是成本低廉的方案 所以VMware虚拟机方案是必须要学习的。 (1)设置网关 打开VMware虚拟机,点击编辑…...
ffmpeg(四):滤镜命令
FFmpeg 的滤镜命令是用于音视频处理中的强大工具,可以完成剪裁、缩放、加水印、调色、合成、旋转、模糊、叠加字幕等复杂的操作。其核心语法格式一般如下: ffmpeg -i input.mp4 -vf "滤镜参数" output.mp4或者带音频滤镜: ffmpeg…...
linux 下常用变更-8
1、删除普通用户 查询用户初始UID和GIDls -l /home/ ###家目录中查看UID cat /etc/group ###此文件查看GID删除用户1.编辑文件 /etc/passwd 找到对应的行,YW343:x:0:0::/home/YW343:/bin/bash 2.将标红的位置修改为用户对应初始UID和GID: YW3…...
根据万维钢·精英日课6的内容,使用AI(2025)可以参考以下方法:
根据万维钢精英日课6的内容,使用AI(2025)可以参考以下方法: 四个洞见 模型已经比人聪明:以ChatGPT o3为代表的AI非常强大,能运用高级理论解释道理、引用最新学术论文,生成对顶尖科学家都有用的…...
Python Ovito统计金刚石结构数量
大家好,我是小马老师。 本文介绍python ovito方法统计金刚石结构的方法。 Ovito Identify diamond structure命令可以识别和统计金刚石结构,但是无法直接输出结构的变化情况。 本文使用python调用ovito包的方法,可以持续统计各步的金刚石结构,具体代码如下: from ovito…...
4. TypeScript 类型推断与类型组合
一、类型推断 (一) 什么是类型推断 TypeScript 的类型推断会根据变量、函数返回值、对象和数组的赋值和使用方式,自动确定它们的类型。 这一特性减少了显式类型注解的需要,在保持类型安全的同时简化了代码。通过分析上下文和初始值,TypeSc…...
Linux-进程间的通信
1、IPC: Inter Process Communication(进程间通信): 由于每个进程在操作系统中有独立的地址空间,它们不能像线程那样直接访问彼此的内存,所以必须通过某种方式进行通信。 常见的 IPC 方式包括&#…...
小智AI+MCP
什么是小智AI和MCP 如果还不清楚的先看往期文章 手搓小智AI聊天机器人 MCP 深度解析:AI 的USB接口 如何使用小智MCP 1.刷支持mcp的小智固件 2.下载官方MCP的示例代码 Github:https://github.com/78/mcp-calculator 安这个步骤执行 其中MCP_ENDPOI…...
